summaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorMats Wichmann <mats@linux.com>2023-10-06 19:25:11 (GMT)
committerMats Wichmann <mats@linux.com>2023-10-06 19:25:59 (GMT)
commitaca9467fc18bca65ab625bed66ff7095753c5d44 (patch)
treedb0d122c84d5776ceab8c9ee9d084b40b6877eef /testing
parent120b2cd0b71363f63e8eb4898a44f1ba8a48af64 (diff)
downloadSCons-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.py13
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()"""