New submission from Florent Xicluna <florent.xicl...@gmail.com>: While writing tests xml.etree, I hit a strange behaviour of import_fresh_module.
How to reproduce: - dummy/__init__.py - dummy/foo.py - dummy/bar.py - test_fresh_import.py # 'dummy/foo.py' from dummy.bar import func # 'dummy/bar.py' fortytwo = 42 def func(): assert fortytwo == 42 # 'test_fresh_import.py' (see attachment) # Output: ~ $ ./python.exe test_fresh_import.py OK dummy.foo OK dummy.bar OK dummy.bar OK dummy.foo Traceback (most recent call last): File "test_fresh_import.py", line 24, in <module> test_fresh(m) File "test_fresh_import.py", line 5, in test_fresh rv = module.func() File "./dummy/bar.py", line 6, in func assert fortytwo == 42 AssertionError ---------- components: Tests files: test_fresh_import.py messages: 153503 nosy: eli.bendersky, flox, ncoghlan priority: normal severity: normal status: open title: behavior of test.support.import_fresh_module type: behavior versions: Python 3.3 Added file: http://bugs.python.org/file24534/test_fresh_import.py _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14035> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com