mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-21 04:10:17 +08:00
Allow drilling down to individual tests using iptest command
This commit is contained in:
parent
1427c61097
commit
296eecde56
@ -368,8 +368,13 @@ def run_iptest():
|
||||
warnings.filterwarnings('ignore',
|
||||
'This will be removed soon. Use IPython.testing.util instead')
|
||||
|
||||
section = test_sections[sys.argv[1]]
|
||||
sys.argv[1:2] = section.includes
|
||||
if sys.argv[1] in test_sections:
|
||||
section = test_sections[sys.argv[1]]
|
||||
sys.argv[1:2] = section.includes
|
||||
else:
|
||||
arg1 = sys.argv[1]
|
||||
section = TestSection(arg1, includes=[arg1])
|
||||
|
||||
|
||||
argv = sys.argv + [ '--detailed-errors', # extra info in tracebacks
|
||||
|
||||
@ -413,7 +418,7 @@ def run_iptest():
|
||||
# assumptions about what needs to be a singleton and what doesn't (app
|
||||
# objects should, individual shells shouldn't). But for now, this
|
||||
# workaround allows the test suite for the inprocess module to complete.
|
||||
if section.name != 'kernel.inprocess':
|
||||
if 'kernel.inprocess' not in section.name:
|
||||
from IPython.testing import globalipapp
|
||||
globalipapp.start_ipython()
|
||||
|
||||
|
@ -349,7 +349,8 @@ def run_iptestall(inc_slow=False, jobs=1, xunit_out=False, coverage_out=False):
|
||||
|
||||
|
||||
def main():
|
||||
if len(sys.argv) > 1 and (sys.argv[1] in test_sections):
|
||||
if len(sys.argv) > 1 and \
|
||||
((sys.argv[1] in test_sections) or sys.argv[1].startswith('IPython')):
|
||||
from .iptest import run_iptest
|
||||
# This is in-process
|
||||
run_iptest()
|
||||
|
Loading…
Reference in New Issue
Block a user