Show More
@@ -419,6 +419,23 b' class TestAutoreload(Fixture):' | |||
|
419 | 419 | with self.assertRaises(ValueError): |
|
420 | 420 | self.shell.magic_autoreload('4') |
|
421 | 421 | |
|
422 | def test_aimport_parsing(self): | |
|
423 | # Modules can be included or excluded all in one line. | |
|
424 | module_reloader = self.shell.auto_magics._reloader | |
|
425 | self.shell.magic_aimport('os') # import and mark `os` for auto-reload. | |
|
426 | assert module_reloader.modules['os'] is True | |
|
427 | assert 'os' not in module_reloader.skip_modules.keys() | |
|
428 | ||
|
429 | self.shell.magic_aimport('-math') # forbid autoreloading of `math` | |
|
430 | assert module_reloader.skip_modules['math'] is True | |
|
431 | assert 'math' not in module_reloader.modules.keys() | |
|
432 | ||
|
433 | self.shell.magic_aimport('-os, math') # Can do this all in one line; wasn't possible before. | |
|
434 | assert module_reloader.modules['math'] is True | |
|
435 | assert 'math' not in module_reloader.skip_modules.keys() | |
|
436 | assert module_reloader.skip_modules['os'] is True | |
|
437 | assert 'os' not in module_reloader.modules.keys() | |
|
438 | ||
|
422 | 439 | def _check_smoketest(self, use_aimport=True): |
|
423 | 440 | """ |
|
424 | 441 | Functional test for the automatic reloader using either |
General Comments 0
You need to be logged in to leave comments.
Login now