# HG changeset patch # User Joseph Pizzi # Date Sat Aug 21 19:32:00 2021 -0500 # Node ID # Parent [py3] Changes file calls to open calls so they work in Python3 Resolves #9299 diff --git a/tests/run_tests.py b/tests/run_tests.py --- a/tests/run_tests.py +++ b/tests/run_tests.py @@ -1120,7 +1120,7 @@ def prepare(self): print("Writing to %s" % self._filename, end=' ') sys.stdout.flush() - self._out = file(self._filename, "w") + self._out = open(self._filename, "w") s = """ @@ -1204,7 +1204,7 @@ def log(self, rclass, tc, e): fn = "logs/%s_%s.log" % (directory.radio_class_id(rclass), tc) - log = file(fn, "a") + log = open(fn, "a") print("---- Begin test %s ----" % tc, file=log) log.write(e.get_detail()) print(file=log) @@ -1344,7 +1344,7 @@ stdout = sys.stdout if not os.path.exists("logs"): os.mkdir("logs") - sys.stdout = file("logs/verbose", "w") + sys.stdout = open("logs/verbose", "w") test_out = TestOutputANSI(stdout) test_out.prepare()