mirror of
https://github.com/python/cpython.git
synced 2025-10-17 20:28:43 +00:00
Issue #16714: use 'raise' exceptions, don't 'throw'.
Patch by Serhiy Storchaka.
This commit is contained in:
commit
5b89840d9c
42 changed files with 64 additions and 64 deletions
|
@ -824,7 +824,7 @@ class PosixTester(unittest.TestCase):
|
|||
posix.rename(support.TESTFN + 'ren', support.TESTFN)
|
||||
raise
|
||||
else:
|
||||
posix.stat(support.TESTFN) # should not throw exception
|
||||
posix.stat(support.TESTFN) # should not raise exception
|
||||
finally:
|
||||
posix.close(f)
|
||||
|
||||
|
@ -842,7 +842,7 @@ class PosixTester(unittest.TestCase):
|
|||
def test_unlink_dir_fd(self):
|
||||
f = posix.open(posix.getcwd(), posix.O_RDONLY)
|
||||
support.create_empty_file(support.TESTFN + 'del')
|
||||
posix.stat(support.TESTFN + 'del') # should not throw exception
|
||||
posix.stat(support.TESTFN + 'del') # should not raise exception
|
||||
try:
|
||||
posix.unlink(support.TESTFN + 'del', dir_fd=f)
|
||||
except:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue