cpython: 8cf8bff3569e (original) (raw)

Mercurial > cpython

changeset 92823:8cf8bff3569e 3.4

Issue #22390: Remove files created by tests [#22390]

Victor Stinner victor.stinner@gmail.com
date Sun, 05 Oct 2014 17:37:41 +0200
parents 0455cbfd7ae6
children ae031e239767
files Lib/test/test_imp.py Lib/test/test_import.py Lib/test/test_pdb.py Lib/test/test_posix.py Lib/test/test_source_encoding.py Lib/test/test_support.py Lib/test/test_threaded_import.py
diffstat 7 files changed, 10 insertions(+), 3 deletions(-)[+] [-] Lib/test/test_imp.py 1 Lib/test/test_import.py 1 Lib/test/test_pdb.py 1 Lib/test/test_posix.py 2 Lib/test/test_source_encoding.py 3 Lib/test/test_support.py 1 Lib/test/test_threaded_import.py 4

line wrap: on

line diff

--- a/Lib/test/test_imp.py +++ b/Lib/test/test_imp.py @@ -198,6 +198,7 @@ class ImportTests(unittest.TestCase): support.unlink(temp_mod_name + ext) support.unlink(init_file_name + ext) support.rmtree(test_package_name)

def test_issue9319(self): path = os.path.dirname(file)

--- a/Lib/test/test_import.py +++ b/Lib/test/test_import.py @@ -1062,6 +1062,7 @@ class ImportTracebackTests(unittest.Test # Issue #11619: The Python parser and the import machinery must not # encode filenames, especially on Windows pyname = script_helper.make_script('', TESTFN_UNENCODABLE, 'pass')

--- a/Lib/test/test_pdb.py +++ b/Lib/test/test_pdb.py @@ -916,6 +916,7 @@ class PdbTestCase(unittest.TestCase): with open(filename, 'w') as f: f.write(textwrap.dedent(script)) self.addCleanup(support.unlink, filename)

--- a/Lib/test/test_posix.py +++ b/Lib/test/test_posix.py @@ -1125,7 +1125,7 @@ class PosixTester(unittest.TestCase): """ Test functions that call path_error2(), providing two filenames in their exceptions. """

if function:

--- a/Lib/test/test_source_encoding.py +++ b/Lib/test/test_source_encoding.py @@ -1,7 +1,7 @@

-- coding: koi8-r --

import unittest -from test.support import TESTFN, unlink, unload +from test.support import TESTFN, unlink, unload, rmtree import importlib import os import sys @@ -129,6 +129,7 @@ class SourceEncodingTest(unittest.TestCa unlink(filename + "c") unlink(filename + "o") unload(TESTFN)

def test_error_from_string(self): # See http://bugs.python.org/issue6289[](#l5.19)

--- a/Lib/test/test_support.py +++ b/Lib/test/test_support.py @@ -69,6 +69,7 @@ class TestSupport(unittest.TestCase): finally: del sys.path[0] support.unlink(mod_filename)

def test_HOST(self): s = socket.socket()

--- a/Lib/test/test_threaded_import.py +++ b/Lib/test/test_threaded_import.py @@ -13,7 +13,8 @@ import time import shutil import unittest from test.support import (

threading = import_module('threading') def task(N, done, done_tasks, errors): @@ -222,6 +223,7 @@ class ThreadedImportTests(unittest.TestC f.write(code.encode('utf-8')) self.addCleanup(unlink, filename) self.addCleanup(forget, TESTFN)