Issue 5354: Change API for import_fresh_module() to better support test_warnings use case (also fixes some bugs in the original implementation)

This commit is contained in:
Nick Coghlan 2009-04-22 15:26:04 +00:00
parent aca19e6a74
commit 5533ff6a2e
5 changed files with 85 additions and 21 deletions

View file

@ -10,8 +10,8 @@ import warning_tests
import warnings as original_warnings
py_warnings = test_support.import_fresh_module('warnings', ['_warnings'])
c_warnings = test_support.import_fresh_module('warnings')
py_warnings = test_support.import_fresh_module('warnings', blocked=['_warnings'])
c_warnings = test_support.import_fresh_module('warnings', fresh=['_warnings'])
@contextmanager
def warnings_state(module):