Commit 3464b14e authored by Stefan Behnel's avatar Stefan Behnel

Fix deprecation warning in test runner for Py3.7: file open mode 'U' is deprecated.

parent 2b3b9a68
...@@ -867,7 +867,7 @@ class CythonCompileTestCase(unittest.TestCase): ...@@ -867,7 +867,7 @@ class CythonCompileTestCase(unittest.TestCase):
def split_source_and_output(self, test_directory, module, workdir): def split_source_and_output(self, test_directory, module, workdir):
source_file = self.find_module_source_file(os.path.join(test_directory, module) + '.pyx') source_file = self.find_module_source_file(os.path.join(test_directory, module) + '.pyx')
source_and_output = io_open(source_file, 'rU', encoding='ISO-8859-1') source_and_output = io_open(source_file, 'r', encoding='ISO-8859-1')
error_writer = warnings_writer = None error_writer = warnings_writer = None
try: try:
out = io_open(os.path.join(workdir, module + os.path.splitext(source_file)[1]), out = io_open(os.path.join(workdir, module + os.path.splitext(source_file)[1]),
......
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