(self)
| 566 | self.shell.run_code("func2()") |
| 567 | |
| 568 | def test_verbose_names(self): |
| 569 | # Asserts correspondense between original mode names and their verbose equivalents. |
| 570 | @dataclass |
| 571 | class AutoreloadSettings: |
| 572 | check_all: bool |
| 573 | enabled: bool |
| 574 | autoload_obj: bool |
| 575 | |
| 576 | def gather_settings(mode): |
| 577 | self.shell.magic_autoreload(mode) |
| 578 | module_reloader = self.shell.auto_magics._reloader |
| 579 | return AutoreloadSettings( |
| 580 | module_reloader.check_all, |
| 581 | module_reloader.enabled, |
| 582 | module_reloader.autoload_obj, |
| 583 | ) |
| 584 | |
| 585 | assert gather_settings("0") == gather_settings("off") |
| 586 | assert gather_settings("0") == gather_settings("OFF") # Case insensitive |
| 587 | assert gather_settings("1") == gather_settings("explicit") |
| 588 | assert gather_settings("2") == gather_settings("all") |
| 589 | assert gather_settings("3") == gather_settings("complete") |
| 590 | |
| 591 | # And an invalid mode name raises an exception. |
| 592 | with self.assertRaises(ValueError): |
| 593 | self.shell.magic_autoreload("4") |
| 594 | |
| 595 | def test_aimport_parsing(self): |
| 596 | # Modules can be included or excluded all in one line. |
nothing calls this directly
no test coverage detected