summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorTim Golden <mail@timgolden.me.uk>2018-07-28 17:27:11 (GMT)
committerGitHub <noreply@github.com>2018-07-28 17:27:11 (GMT)
commit1561703a78849ac3511055590d9d1bd2c62a2072 (patch)
tree3f340e73019b01d61e35f9040cb2b6572535b092 /Lib
parentc6dabe37e3c4d449562182b044184d1756bea037 (diff)
downloadcpython-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.py5
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):