From 6704d0fa67a2d8d6181fb0512010bf9bd0bb7623 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Mon, 28 Nov 2022 22:16:26 -0800 Subject: [ci skip] fix sider complaints --- testing/framework/TestCmdTests.py | 9 ++++++--- testing/framework/TestCommonTests.py | 9 +++++---- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/testing/framework/TestCmdTests.py b/testing/framework/TestCmdTests.py index 26bba28..e666ac4 100644 --- a/testing/framework/TestCmdTests.py +++ b/testing/framework/TestCmdTests.py @@ -3177,9 +3177,12 @@ class writable_TestCase(TestCmdTestCase): test.write(['foo', 'file2'], "Test file #2\n") if sys.platform != 'win32': - try: symlink = os.symlink - except AttributeError: pass - else: symlink('no_such_file', test.workpath('dangling_symlink')) + try: + symlink = os.symlink + except AttributeError: + pass + else: + symlink('no_such_file', test.workpath('dangling_symlink')) test.writable(test.workdir, 0) # XXX skip these tests if euid == 0? diff --git a/testing/framework/TestCommonTests.py b/testing/framework/TestCommonTests.py index 93aa774..fe8d4cb 100644 --- a/testing/framework/TestCommonTests.py +++ b/testing/framework/TestCommonTests.py @@ -133,6 +133,7 @@ class TestCommonTestCase(unittest.TestCase): stdout = run_env.stdout() stderr = run_env.stderr() + breakpoint() expect_stdout = expect_stdout % self.__dict__ assert stdout == expect_stdout, assert_display(expect_stdout, stdout, @@ -1941,8 +1942,8 @@ class run_TestCase(TestCommonTestCase): None """) - expect_stderr = lstrip(\ -fr"""Exception trying to execute: \[{re.escape(repr(sys.executable))}, '[^']*pass'\] + expect_stderr = lstrip( + fr"""Exception trying to execute: \[{re.escape(repr(sys.executable))}, '[^']*pass'\] Traceback \(most recent call last\): File "", line \d+, in (\?|) File "[^"]+TestCommon.py", line \d+, in run @@ -2389,13 +2390,13 @@ class variables_TestCase(TestCommonTestCase): ] script = "import TestCommon\n" + \ - '\n'.join([ f"print(TestCommon.{v})\n" for v in variables ]) + '\n'.join([f"print(TestCommon.{v})\n" for v in variables]) run_env.run(program=sys.executable, stdin=script) stderr = run_env.stderr() assert stderr == "", stderr script = "from TestCommon import *\n" + \ - '\n'.join([ f"print({v})" for v in variables ]) + '\n'.join([f"print({v})" for v in variables]) run_env.run(program=sys.executable, stdin=script) stderr = run_env.stderr() assert stderr == "", stderr -- cgit v0.12