mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Closes #14158: improved resilience to test files left behind.
This commit is contained in:
parent
4d2bfb5e08
commit
f959618142
3 changed files with 33 additions and 11 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue