diff options
author | Mats Wichmann <mats@linux.com> | 2023-10-06 19:25:11 (GMT) |
---|---|---|
committer | Mats Wichmann <mats@linux.com> | 2023-10-06 19:25:59 (GMT) |
commit | aca9467fc18bca65ab625bed66ff7095753c5d44 (patch) | |
tree | db0d122c84d5776ceab8c9ee9d084b40b6877eef /testing | |
parent | 120b2cd0b71363f63e8eb4898a44f1ba8a48af64 (diff) | |
download | SCons-aca9467fc18bca65ab625bed66ff7095753c5d44.zip SCons-aca9467fc18bca65ab625bed66ff7095753c5d44.tar.gz SCons-aca9467fc18bca65ab625bed66ff7095753c5d44.tar.bz2 |
Fixup one test framework test [skip appveyor]
Looking at wrong exceptions for possible rmdir failures
Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'testing')
-rw-r--r-- | testing/framework/TestCmdTests.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/testing/framework/TestCmdTests.py b/testing/framework/TestCmdTests.py index dc752ba..7cabf44 100644 --- a/testing/framework/TestCmdTests.py +++ b/testing/framework/TestCmdTests.py @@ -1601,10 +1601,10 @@ class rmdir_TestCase(TestCmdTestCase): try: test.rmdir(['no', 'such', 'dir']) - except EnvironmentError: + except FileNotFoundError: pass else: - raise Exception("did not catch expected SConsEnvironmentError") + raise Exception("did not catch expected FileNotFoundError") test.subdir(['sub'], ['sub', 'dir'], @@ -1616,19 +1616,19 @@ class rmdir_TestCase(TestCmdTestCase): try: test.rmdir(['sub']) - except EnvironmentError: + except OSError: pass else: - raise Exception("did not catch expected SConsEnvironmentError") + raise Exception("did not catch expected OSError") assert os.path.isdir(s_d_o), f"{s_d_o} is gone?" try: test.rmdir(['sub']) - except EnvironmentError: + except OSError: pass else: - raise Exception("did not catch expected SConsEnvironmentError") + raise Exception("did not catch expected OSError") assert os.path.isdir(s_d_o), f"{s_d_o} is gone?" @@ -1647,7 +1647,6 @@ class rmdir_TestCase(TestCmdTestCase): assert not os.path.exists(s), f"{s} exists?" - class run_TestCase(TestCmdTestCase): def test_run(self) -> None: """Test run()""" |