diff options
author | Tim Golden <mail@timgolden.me.uk> | 2018-07-28 17:27:11 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-28 17:27:11 (GMT) |
commit | 1561703a78849ac3511055590d9d1bd2c62a2072 (patch) | |
tree | 3f340e73019b01d61e35f9040cb2b6572535b092 /Lib | |
parent | c6dabe37e3c4d449562182b044184d1756bea037 (diff) | |
download | cpython-1561703a78849ac3511055590d9d1bd2c62a2072.zip cpython-1561703a78849ac3511055590d9d1bd2c62a2072.tar.gz cpython-1561703a78849ac3511055590d9d1bd2c62a2072.tar.bz2 |
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
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_bz2.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Lib/test/test_bz2.py b/Lib/test/test_bz2.py index e62729a..f158b90 100644 --- a/Lib/test/test_bz2.py +++ b/Lib/test/test_bz2.py @@ -81,10 +81,7 @@ class BaseTest(unittest.TestCase): os.close(fd) def tearDown(self): - try: - os.unlink(self.filename) - except FileNotFoundError: - pass + unlink(self.filename) class BZ2FileTest(BaseTest): |