Allow 'iptest IPython.lib' as well as 'iptest lib'

This commit is contained in:
Thomas Kluyver 2013-09-11 09:54:45 -07:00
parent 296eecde56
commit 860da5d81a

View File

@ -368,11 +368,14 @@ def run_iptest():
warnings.filterwarnings('ignore',
'This will be removed soon. Use IPython.testing.util instead')
if sys.argv[1] in test_sections:
section = test_sections[sys.argv[1]]
arg1 = sys.argv[1]
if arg1 in test_sections:
section = test_sections[arg1]
sys.argv[1:2] = section.includes
elif arg1.startswith('IPython.') and arg1[8:] in test_sections:
section = test_sections[arg1[8:]]
sys.argv[1:2] = section.includes
else:
arg1 = sys.argv[1]
section = TestSection(arg1, includes=[arg1])