Show More
@@ -50,9 +50,8 b' The following magic commands are provided:' | |||||
50 |
|
50 | |||
51 | ``%autoreload 3``, ``%autoreload complete`` |
|
51 | ``%autoreload 3``, ``%autoreload complete`` | |
52 |
|
52 | |||
53 | Reload all modules (except those excluded by ``%aimport``) AND |
|
53 | Same as 2/all, but also adds any new objects in the module. See | |
54 | autoload newly added objects every time before executing the |
|
54 | unit test at IPython/extensions/tests/test_autoreload.py::test_autoload_newly_added_objects | |
55 | Python code typed. |
|
|||
56 |
|
55 | |||
57 | ``%aimport`` |
|
56 | ``%aimport`` | |
58 |
|
57 | |||
@@ -540,8 +539,8 b' class AutoreloadMagics(Magics):' | |||||
540 | before executing the Python code typed. |
|
539 | before executing the Python code typed. | |
541 |
|
540 | |||
542 | %autoreload 3 or %autoreload complete |
|
541 | %autoreload 3 or %autoreload complete | |
543 | Reload all modules (except those excluded by %aimport) every time |
|
542 | Same as 2/all, but also but also adds any new objects in the module. See | |
544 | before executing the Python code typed. |
|
543 | unit test at IPython/extensions/tests/test_autoreload.py::test_autoload_newly_added_objects | |
545 |
|
544 | |||
546 | Reloading Python modules in a reliable way is in general |
|
545 | Reloading Python modules in a reliable way is in general | |
547 | difficult, and unexpected things may occur. %autoreload tries to |
|
546 | difficult, and unexpected things may occur. %autoreload tries to |
@@ -310,6 +310,7 b' class TestAutoreload(Fixture):' | |||||
310 | self.shell.run_code("pass") # trigger another reload |
|
310 | self.shell.run_code("pass") # trigger another reload | |
311 |
|
311 | |||
312 | def test_autoload_newly_added_objects(self): |
|
312 | def test_autoload_newly_added_objects(self): | |
|
313 | # All of these fail with %autoreload 2 | |||
313 | self.shell.magic_autoreload("3") |
|
314 | self.shell.magic_autoreload("3") | |
314 | mod_code = """ |
|
315 | mod_code = """ | |
315 | def func1(): pass |
|
316 | def func1(): pass |
General Comments 0
You need to be logged in to leave comments.
Login now