##// END OF EJS Templates
Add test that numpy, IPython.parallel and IPython.zmq aren't imported on startup.
Thomas Kluyver -
Show More
@@ -33,6 +33,7 b' import nose.tools as nt'
33
33
34 # Our own
34 # Our own
35 from IPython.testing.decorators import skipif
35 from IPython.testing.decorators import skipif
36 from IPython.testing import tools as tt
36 from IPython.utils import io
37 from IPython.utils import io
37
38
38 #-----------------------------------------------------------------------------
39 #-----------------------------------------------------------------------------
@@ -401,6 +402,18 b' class TestSystemRaw(unittest.TestCase):'
401 cmd = ur'''python -c "'åäö'" '''
402 cmd = ur'''python -c "'åäö'" '''
402 ip.system_raw(cmd)
403 ip.system_raw(cmd)
403
404
405 class TestModules(unittest.TestCase, tt.TempFileMixin):
406 def test_extraneous_loads(self):
407 """Test we're not loading modules on startup that we shouldn't.
408 """
409 self.mktmp("import sys\n"
410 "print('numpy' in sys.modules)\n"
411 "print('IPython.parallel' in sys.modules)\n"
412 "print('IPython.zmq' in sys.modules)\n"
413 )
414 out = "False\nFalse\nFalse\n"
415 tt.ipexec_validate(self.fname, out)
416
404
417
405 def test__IPYTHON__():
418 def test__IPYTHON__():
406 # This shouldn't raise a NameError, that's all
419 # This shouldn't raise a NameError, that's all
General Comments 0
You need to be logged in to leave comments. Login now