Commit 9b925e03 authored by Stefan Behnel's avatar Stefan Behnel

fix Py3 bug in test runner: setUp() stored view instead of list for later restore in tearDown()

parent 24c7c8ec
...@@ -637,12 +637,11 @@ class CythonCompileTestCase(unittest.TestCase): ...@@ -637,12 +637,11 @@ class CythonCompileTestCase(unittest.TestCase):
def setUp(self): def setUp(self):
from Cython.Compiler import Options from Cython.Compiler import Options
self._saved_options = [ (name, getattr(Options, name)) self._saved_options = [
for name in ('warning_errors', (name, getattr(Options, name))
'clear_to_none', for name in ('warning_errors', 'clear_to_none', 'error_on_unknown_names', 'error_on_uninitialized')
'error_on_unknown_names', ]
'error_on_uninitialized') ] self._saved_default_directives = list(Options.directive_defaults.items())
self._saved_default_directives = Options.directive_defaults.items()
Options.warning_errors = self.warning_errors Options.warning_errors = self.warning_errors
if sys.version_info >= (3, 4): if sys.version_info >= (3, 4):
Options.directive_defaults['autotestdict'] = False Options.directive_defaults['autotestdict'] = False
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment