Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1561703

Browse files
authored
bpo-42349: Switch to test.support.unlink per review by Serhiy Storchaka (GH-8529)
Serhiy Storchaka pointed out that using test.support.unlink was preferable
1 parent c6dabe3 commit 1561703

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

Lib/test/test_bz2.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,7 @@ def setUp(self):
8181
os.close(fd)
8282

8383
def tearDown(self):
84-
try:
85-
os.unlink(self.filename)
86-
except FileNotFoundError:
87-
pass
84+
unlink(self.filename)
8885

8986

9087
class BZ2FileTest(BaseTest):

0 commit comments

Comments
 (0)