diff options
| author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2012-03-02 01:01:13 +0000 |
|---|---|---|
| committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2012-03-02 01:01:13 +0000 |
| commit | f959618142888fab373c43edd35f20506a9740dc (patch) | |
| tree | cc1f5a1bf7bac40e8b2913bb4c60522d875c4d22 /Lib/test/test_base64.py | |
| parent | 4d2bfb5e08619581a9f205b6145f97e4b0d838df (diff) | |
| download | cpython-git-f959618142888fab373c43edd35f20506a9740dc.tar.gz | |
Closes #14158: improved resilience to test files left behind.
Diffstat (limited to 'Lib/test/test_base64.py')
| -rw-r--r-- | Lib/test/test_base64.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_base64.py b/Lib/test/test_base64.py index 93c623cc8a..ca94504b1c 100644 --- a/Lib/test/test_base64.py +++ b/Lib/test/test_base64.py @@ -2,6 +2,7 @@ import unittest from test import support import base64 import binascii +import os import sys import subprocess @@ -227,6 +228,10 @@ class BaseXYTestCase(unittest.TestCase): class TestMain(unittest.TestCase): + def tearDown(self): + if os.path.exists(support.TESTFN): + os.unlink(support.TESTFN) + def get_output(self, *args, **options): args = (sys.executable, '-m', 'base64') + args return subprocess.check_output(args, **options) |
