#2621 rename test.test_support to test.support

This commit is contained in:
Benjamin Peterson 2008-05-20 21:35:26 +00:00
parent 6a654814ea
commit ee8712cda4
358 changed files with 1308 additions and 1307 deletions

View file

@ -179,14 +179,14 @@ at the top-level directory where Python was built. On Windows, executing
tests.
:mod:`test.test_support` --- Utility functions for tests
:mod:`test.support` --- Utility functions for tests
========================================================
.. module:: test.test_support
.. module:: test.support
:synopsis: Support for Python regression tests.
The :mod:`test.test_support` module provides support for Python's regression
The :mod:`test.support` module provides support for Python's regression
tests.
This module defines the following exceptions:
@ -236,7 +236,7 @@ The :mod:`test.test_support` module defines the following constants:
Set to the path that a temporary file may be created at. Any temporary that is
created should be closed and unlinked (removed).
The :mod:`test.test_support` module defines the following functions:
The :mod:`test.support` module defines the following functions:
.. function:: forget(module_name)
@ -311,7 +311,7 @@ The :mod:`test.test_support` module defines the following functions:
assert s.getvalue() == "hello"
The :mod:`test.test_support` module defines the following classes:
The :mod:`test.support` module defines the following classes:
.. class:: TransientResource(exc[, **kwargs])

View file

@ -27,7 +27,7 @@
try:
from bsddb3 import test_support
except ImportError:
from test import test_support
from test import support as test_support
#----------------------------------------------------------------------

View file

@ -23,7 +23,7 @@
try:
from bsddb3 import test_support
except ImportError:
from test import test_support
from test import support as test_support
DASH = b'-'
letters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'

View file

@ -19,7 +19,7 @@
try:
from bsddb3 import test_support
except ImportError:
from test import test_support
from test import support as test_support
lexical_cmp = cmp

View file

@ -9,7 +9,7 @@
try:
from bsddb3 import test_support
except ImportError:
from test import test_support
from test import support as test_support
#----------------------------------------------------------------------

View file

@ -14,7 +14,7 @@
try:
from bsddb3 import test_support
except ImportError:
from test import test_support
from test import support as test_support
#----------------------------------------------------------------------

View file

@ -12,7 +12,7 @@
try:
from bsddb3 import test_support
except ImportError:
from test import test_support
from test import support as test_support
from bsddb.test.test_all import verbose

View file

@ -37,7 +37,7 @@
try:
from bsddb3 import test_support
except ImportError:
from test import test_support
from test import support as test_support
#----------------------------------------------------------------------

View file

@ -18,7 +18,7 @@
try:
from bsddb3 import test_support
except ImportError:
from test import test_support
from test import support as test_support
from bsddb.test.test_all import verbose

View file

@ -21,7 +21,7 @@
try:
from bsddb3 import test_support
except ImportError:
from test import test_support
from test import support as test_support
#----------------------------------------------------------------------

View file

@ -26,7 +26,7 @@
try:
from bsddb3 import test_support
except ImportError:
from test import test_support
from test import support as test_support
#----------------------------------------------------------------------

View file

@ -17,7 +17,7 @@
try:
from bsddb3 import test_support
except ImportError:
from test import test_support
from test import support as test_support
#----------------------------------------------------------------------

View file

@ -16,7 +16,7 @@
try:
from bsddb3 import test_support
except ImportError:
from test import test_support
from test import support as test_support
#----------------------------------------------------------------------

View file

@ -21,7 +21,7 @@
try:
from bsddb3 import test_support
except ImportError:
from test import test_support
from test import support as test_support
letters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'

View file

@ -14,7 +14,7 @@
try:
from bsddb3 import test_support
except ImportError:
from test import test_support
from test import support as test_support
class DBSequenceTest(unittest.TestCase):

View file

@ -36,7 +36,7 @@ class WindowsError(Exception):
try:
from bsddb3 import test_support
except ImportError:
from test import test_support
from test import support as test_support
#----------------------------------------------------------------------

View file

@ -5,7 +5,7 @@
import os
import shutil
import sys
import test.test_support
import test.support
import unittest
@ -39,13 +39,13 @@ def tearDown(self):
self.cleanup_testfn()
def cleanup_testfn(self):
path = test.test_support.TESTFN
path = test.support.TESTFN
if os.path.isfile(path):
os.remove(path)
elif os.path.isdir(path):
shutil.rmtree(path)
def write_setup(self, text, path=test.test_support.TESTFN):
def write_setup(self, text, path=test.support.TESTFN):
open(path, "w").write(text)
return path
@ -63,8 +63,8 @@ def test_run_setup_uses_current_dir(self):
cwd = os.getcwd()
# Create a directory and write the setup.py file there:
os.mkdir(test.test_support.TESTFN)
setup_py = os.path.join(test.test_support.TESTFN, "setup.py")
os.mkdir(test.support.TESTFN)
setup_py = os.path.join(test.support.TESTFN, "setup.py")
distutils.core.run_setup(
self.write_setup(setup_prints_cwd, path=setup_py))

View file

@ -7,7 +7,7 @@
import sys
import unittest
from test.test_support import TESTFN
from test.support import TESTFN
class test_dist(distutils.cmd.Command):

View file

@ -4,7 +4,7 @@
import os
import unittest
from test.test_support import TESTFN
from test.support import TESTFN
class SysconfigTestCase(unittest.TestCase):

View file

@ -34,7 +34,7 @@
from email import base64mime
from email import quoprimime
from test.test_support import findfile, run_unittest
from test.support import findfile, run_unittest
from email.test import __file__ as landmark

View file

@ -3,7 +3,7 @@
# email package unit tests for (optional) Asian codecs
import unittest
from test.test_support import TestSkipped, run_unittest
from test.support import TestSkipped, run_unittest
from email.test.test_email import TestEmailBase
from email.Charset import Charset

View file

@ -3,7 +3,7 @@
# email package unit tests for (optional) Asian codecs
import unittest
from test.test_support import TestSkipped, run_unittest
from test.support import TestSkipped, run_unittest
from email.test.test_email import TestEmailBase
from email.charset import Charset

View file

@ -13,7 +13,7 @@
from types import ListType
from email.test.test_email import TestEmailBase
from test.test_support import TestSkipped
from test.support import TestSkipped
import email
from email import __file__ as testfile
@ -128,7 +128,7 @@ def suite():
def test_main():
for testclass in _testclasses():
test_support.run_unittest(testclass)
support.run_unittest(testclass)

View file

@ -1,4 +1,4 @@
from test.test_support import TestFailed
from test.support import TestFailed
# A test for SF bug 422177: manifest float constants varied way too much in
# precision depending on whether Python was loading a module for the first

View file

@ -5,7 +5,7 @@
import sys
import os
from test import test_support, seq_tests
from test import support, seq_tests
def CmpToKey(mycmp):
'Convert a cmp= function into a key= function'
@ -66,14 +66,14 @@ def test_print(self):
d.append(d)
d.append(400)
try:
fo = open(test_support.TESTFN, "w")
fo = open(support.TESTFN, "w")
fo.write(str(d))
fo.close()
fo = open(test_support.TESTFN, "r")
fo = open(support.TESTFN, "r")
self.assertEqual(fo.read(), repr(d))
finally:
fo.close()
os.remove(test_support.TESTFN)
os.remove(support.TESTFN)
def test_set_subscript(self):
a = self.type2test(range(20))

View file

@ -7,7 +7,7 @@
#
import unittest
from test import test_support
from test import support
#
# One test case for outstanding bugs at the moment:
@ -22,7 +22,7 @@ def setUp(self):
self.normalized = b"AAA\nBBB\nCCC\nDDD\nEEE\n".decode("ASCII")
def tearDown(self):
test_support.unlink(test_support.TESTFN)
support.unlink(support.TESTFN)
def test_issue1395_1(self):
@ -81,7 +81,7 @@ def test_issue1395_5(self):
def test_main():
test_support.run_unittest(
support.run_unittest(
TextIOWrapperTest)
if __name__ == "__main__":

View file

@ -3,7 +3,7 @@
import pickletools
import copyreg
from test.test_support import TestFailed, TESTFN, run_with_locale
from test.support import TestFailed, TESTFN, run_with_locale
from pickle import bytes_types

View file

@ -171,7 +171,7 @@
newsoft = min(hard, max(soft, 1024*2048))
resource.setrlimit(resource.RLIMIT_STACK, (newsoft, hard))
from test import test_support
from test import support
RESOURCE_NAMES = ('audio', 'curses', 'largefile', 'network', 'bsddb',
'decimal', 'compiler', 'subprocess', 'urlfetch')
@ -209,7 +209,7 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, generate=False,
values that would normally be set by flags on the command line.
"""
test_support.record_original_stdout(sys.stdout)
support.record_original_stdout(sys.stdout)
try:
opts, args = getopt.getopt(sys.argv[1:], 'hvgqxsSrf:lu:t:TD:NLR:wM:n',
['help', 'verbose', 'quiet', 'exclude',
@ -284,7 +284,7 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, generate=False,
# stringobject.c filling slowly with random data
warm_char_cache()
elif o in ('-M', '--memlimit'):
test_support.set_memlimit(a)
support.set_memlimit(a)
elif o in ('-u', '--use'):
u = [x.lower() for x in a.split(',')]
for r in u:
@ -390,8 +390,8 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, generate=False,
tracer = trace.Trace(ignoredirs=[sys.prefix, sys.exec_prefix],
trace=False, count=True)
test_times = []
test_support.verbose = verbose # Tell tests to be moderately quiet
test_support.use_resources = use_resources
support.verbose = verbose # Tell tests to be moderately quiet
support.use_resources = use_resources
save_modules = sys.modules.keys()
for test in tests:
if not quiet:
@ -433,7 +433,7 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, generate=False,
# Unload the newly imported modules (best effort finalization)
for module in sys.modules.keys():
if module not in save_modules and module.startswith("test."):
test_support.unload(module)
support.unload(module)
# The lists won't be sorted if running with -r
good.sort()
@ -479,7 +479,7 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, generate=False,
print("Re-running test %r in verbose mode" % test)
sys.stdout.flush()
try:
test_support.verbose = True
support.verbose = True
ok = runtest(test, generate, True, quiet, test_times, testdir,
huntrleaks, debug)
except KeyboardInterrupt:
@ -526,7 +526,6 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, generate=False,
]
NOTTESTS = {
'test_support',
'test_future1',
'test_future2',
}
@ -572,7 +571,7 @@ def runtest(test, generate, verbose, quiet, test_times,
def runtest_inner(test, generate, verbose, quiet, test_times,
testdir=None, huntrleaks=False, debug=False):
test_support.unload(test)
support.unload(test)
if not testdir:
testdir = findtestdir()
if verbose:
@ -606,19 +605,19 @@ def runtest_inner(test, generate, verbose, quiet, test_times,
test_times.append((test_time, test))
finally:
sys.stdout = save_stdout
except test_support.ResourceDenied as msg:
except support.ResourceDenied as msg:
if not quiet:
print(test, "skipped --", msg)
sys.stdout.flush()
return -2
except (ImportError, test_support.TestSkipped) as msg:
except (ImportError, support.TestSkipped) as msg:
if not quiet:
print(test, "skipped --", msg)
sys.stdout.flush()
return -1
except KeyboardInterrupt:
raise
except test_support.TestFailed as msg:
except support.TestFailed as msg:
print("test", test, "failed --", msg)
sys.stdout.flush()
return 0
@ -652,7 +651,7 @@ def cleanup_test_droppings(testname, verbose):
# since if a test leaves a file open, it cannot be deleted by name (while
# there's nothing we can do about that here either, we can display the
# name of the offending test, which is a real help).
for name in (test_support.TESTFN,
for name in (support.TESTFN,
"db_home",
):
if not os.path.exists(name):
@ -1206,10 +1205,10 @@ def getexpected(self):
if __name__ == '__main__':
# Remove regrtest.py's own directory from the module search path. This
# prevents relative imports from working, and relative imports will screw
# up the testing framework. E.g. if both test.test_support and
# test_support are imported, they will not contain the same globals, and
# up the testing framework. E.g. if both test.support and
# support are imported, they will not contain the same globals, and
# much of the testing framework relies on the globals in the
# test.test_support module.
# test.support module.
mydir = os.path.abspath(os.path.normpath(os.path.dirname(sys.argv[0])))
i = pathlen = len(sys.path)
while i >= 0:

View file

@ -3,7 +3,7 @@
"""
import unittest, string, sys, struct
from test import test_support
from test import support
from collections import UserList
class Sequence:

View file

@ -1,7 +1,7 @@
"""Supporting definitions for the Python regression tests."""
if __name__ != 'test.test_support':
raise ImportError('test_support must be imported from the test package')
if __name__ != 'test.support':
raise ImportError('support must be imported from the test package')
import contextlib
import errno
@ -700,7 +700,7 @@ def run_doctest(module, verbosity=None):
"""Run doctest on the given module. Return (#failures, #tests).
If optional argument verbosity is not specified (or is None), pass
test_support's belief about verbosity on to doctest. Else doctest's
support's belief about verbosity on to doctest. Else doctest's
usual behavior is used (it searches sys.argv for -v).
"""

View file

@ -5,7 +5,7 @@
import os, unittest
from SimpleHTTPServer import SimpleHTTPRequestHandler
from test import test_support
from test import support
class SocketlessRequestHandler (SimpleHTTPRequestHandler):
@ -35,7 +35,7 @@ def test_startWithDoubleSlash (self):
def test_main():
test_support.run_unittest(SimpleHTTPRequestHandlerTestCase)
support.run_unittest(SimpleHTTPRequestHandlerTestCase)
if __name__ == "__main__":
test_main()

View file

@ -1,5 +1,5 @@
import unittest
from test.test_support import run_unittest, catch_warning
from test.support import run_unittest, catch_warning
import sys
import warnings

View file

@ -1,6 +1,6 @@
#! /usr/bin/env python
import unittest
from test import test_support
from test import support
import __future__
GOOD_SERIALS = ("alpha", "beta", "candidate", "final")
@ -57,7 +57,7 @@ def check(t, name):
".compiler_flag isn't int")
def test_main():
test_support.run_unittest(FutureTest)
support.run_unittest(FutureTest)
if __name__ == "__main__":
test_main()

View file

@ -1,4 +1,4 @@
from test.test_support import verbose, TestSkipped, run_unittest
from test.support import verbose, TestSkipped, run_unittest
from _locale import (setlocale, LC_ALL, LC_CTYPE, LC_NUMERIC, RADIXCHAR, THOUSEP, nl_langinfo,
localeconv, Error)
import unittest

View file

@ -4,7 +4,7 @@
"""Unit tests for abc.py."""
import unittest
from test import test_support
from test import support
import abc
from inspect import isabstract
@ -170,7 +170,7 @@ class C(A, B):
def test_main():
test_support.run_unittest(TestABC)
support.run_unittest(TestABC)
if __name__ == "__main__":

View file

@ -5,7 +5,7 @@
import unittest
from numbers import Complex, Real, Rational, Integral
from numbers import Number
from test import test_support
from test import support
class TestNumbers(unittest.TestCase):
def test_int(self):
@ -40,7 +40,7 @@ def test_complex(self):
self.assertRaises(TypeError, int, c1)
def test_main():
test_support.run_unittest(TestNumbers)
support.run_unittest(TestNumbers)
if __name__ == "__main__":

View file

@ -7,9 +7,9 @@
import unittest
import anydbm
import glob
from test import test_support
from test import support
_fname = test_support.TESTFN
_fname = support.TESTFN
_all_modules = []
@ -121,7 +121,7 @@ def setUp(self):
def test_main():
try:
for module in dbm_iterator():
test_support.run_unittest(AnyDBMTestCase)
support.run_unittest(AnyDBMTestCase)
finally:
delete_files()

View file

@ -4,7 +4,7 @@
"""
import unittest
from test import test_support
from test import support
from weakref import proxy
import array, io, math
from pickle import loads, dumps
@ -162,13 +162,13 @@ def test_insert(self):
def test_tofromfile(self):
a = array.array(self.typecode, 2*self.example)
self.assertRaises(TypeError, a.tofile)
test_support.unlink(test_support.TESTFN)
f = open(test_support.TESTFN, 'wb')
support.unlink(support.TESTFN)
f = open(support.TESTFN, 'wb')
try:
a.tofile(f)
f.close()
b = array.array(self.typecode)
f = open(test_support.TESTFN, 'rb')
f = open(support.TESTFN, 'rb')
self.assertRaises(TypeError, b.fromfile)
b.fromfile(f, len(self.example))
self.assertEqual(b, array.array(self.typecode, self.example))
@ -180,7 +180,7 @@ def test_tofromfile(self):
finally:
if not f.closed:
f.close()
test_support.unlink(test_support.TESTFN)
support.unlink(support.TESTFN)
def test_tofromlist(self):
a = array.array(self.typecode, 2*self.example)
@ -967,14 +967,14 @@ class DoubleTest(FPTest):
def test_main(verbose=None):
import sys
test_support.run_unittest(*tests)
support.run_unittest(*tests)
# verify reference counting
if verbose and hasattr(sys, "gettotalrefcount"):
import gc
counts = [None] * 5
for i in range(len(counts)):
test_support.run_unittest(*tests)
support.run_unittest(*tests)
gc.collect()
counts[i] = sys.gettotalrefcount()
print(counts)

View file

@ -1,5 +1,5 @@
import sys, unittest
from test import test_support
from test import support
import _ast
def to_tuple(t):
@ -176,7 +176,7 @@ def test_pickling(self):
self.assertEquals(to_tuple(ast2), to_tuple(ast))
def test_main():
test_support.run_unittest(AST_Tests)
support.run_unittest(AST_Tests)
def main():
if __name__ != '__main__':

View file

@ -4,9 +4,9 @@
import asyncore, asynchat, socket, threading, time
import unittest
import sys
from test import test_support
from test import support
HOST = test_support.HOST
HOST = support.HOST
SERVER_QUIT = b'QUIT\n'
class echo_server(threading.Thread):
@ -18,7 +18,7 @@ def __init__(self, event):
threading.Thread.__init__(self)
self.event = event
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.port = test_support.bind_port(self.sock)
self.port = support.bind_port(self.sock)
def run(self):
self.sock.listen(1)
@ -248,7 +248,7 @@ def test_given_list(self):
def test_main(verbose=None):
test_support.run_unittest(TestAsynchat, TestAsynchat_WithPoll,
support.run_unittest(TestAsynchat, TestAsynchat_WithPoll,
TestHelperFunctions, TestFifo)
if __name__ == "__main__":

View file

@ -7,12 +7,12 @@
import sys
import time
from test import test_support
from test.test_support import TESTFN, run_unittest, unlink
from test import support
from test.support import TESTFN, run_unittest, unlink
from io import BytesIO
from io import StringIO
HOST = test_support.HOST
HOST = support.HOST
class dummysocket:
def __init__(self):
@ -334,7 +334,7 @@ def test_send(self):
self.evt = threading.Event()
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.sock.settimeout(3)
self.port = test_support.bind_port(self.sock)
self.port = support.bind_port(self.sock)
cap = BytesIO()
args = (self.evt, cap, self.sock)

View file

@ -2,7 +2,7 @@
import unittest
import io
import atexit
from test import test_support
from test import support
### helpers
def h1():
@ -109,7 +109,7 @@ def test_bound_methods(self):
def test_main():
test_support.run_unittest(TestCase)
support.run_unittest(TestCase)
if __name__ == "__main__":
test_main()

View file

@ -1,6 +1,6 @@
# Test audioop.
import audioop
from test.test_support import verbose
from test.support import verbose
def gendata1():
return b'\0\1\2'

View file

@ -1,6 +1,6 @@
# Augmented assignment test.
from test.test_support import run_unittest
from test.support import run_unittest
import unittest

View file

@ -1,5 +1,5 @@
import unittest
from test import test_support
from test import support
import base64
import binascii
@ -209,7 +209,7 @@ def test_ErrorHeritage(self):
def test_main():
test_support.run_unittest(__name__)
support.run_unittest(__name__)
if __name__ == '__main__':
test_main()

View file

@ -1,5 +1,5 @@
from test import test_support
from test.test_support import bigaddrspacetest, MAX_Py_ssize_t
from test import support
from test.support import bigaddrspacetest, MAX_Py_ssize_t
import unittest
import operator
@ -38,9 +38,9 @@ def test_optimized_concat(self):
def test_main():
test_support.run_unittest(StrTest)
support.run_unittest(StrTest)
if __name__ == '__main__':
if len(sys.argv) > 1:
test_support.set_memlimit(sys.argv[1])
support.set_memlimit(sys.argv[1])
test_main()

View file

@ -1,5 +1,5 @@
from test import test_support
from test.test_support import bigmemtest, _1G, _2G
from test import support
from test.support import bigmemtest, _1G, _2G
import unittest
import operator
@ -957,9 +957,9 @@ def test_sort(self, size):
self.assertEquals(l[-10:], [5] * 10)
def test_main():
test_support.run_unittest(StrTest, TupleTest, ListTest)
support.run_unittest(StrTest, TupleTest, ListTest)
if __name__ == '__main__':
if len(sys.argv) > 1:
test_support.set_memlimit(sys.argv[1])
support.set_memlimit(sys.argv[1])
test_main()

View file

@ -1,6 +1,6 @@
"""Test the binascii C module."""
from test import test_support
from test import support
import unittest
import binascii
@ -169,7 +169,7 @@ def test_empty_string(self):
binascii.crc_hqx('', 0)
def test_main():
test_support.run_unittest(BinASCIITest)
support.run_unittest(BinASCIITest)
if __name__ == "__main__":
test_main()

View file

@ -7,18 +7,18 @@
import binhex
import os
import unittest
from test import test_support
from test import support
class BinHexTestCase(unittest.TestCase):
def setUp(self):
self.fname1 = test_support.TESTFN + "1"
self.fname2 = test_support.TESTFN + "2"
self.fname1 = support.TESTFN + "1"
self.fname2 = support.TESTFN + "2"
def tearDown(self):
test_support.unlink(self.fname1)
test_support.unlink(self.fname2)
support.unlink(self.fname1)
support.unlink(self.fname2)
DATA = b'Jack is my hero'
@ -39,7 +39,7 @@ def test_binhex(self):
def test_main():
test_support.run_unittest(BinHexTestCase)
support.run_unittest(BinHexTestCase)
if __name__ == "__main__":

View file

@ -1,7 +1,7 @@
"""Tests for binary operators on subtypes of built-in types."""
import unittest
from test import test_support
from test import support
def gcd(a, b):
"""Greatest common divisor using Euclid's algorithm."""
@ -317,7 +317,7 @@ def test_future_div(self):
"""
def test_main():
test_support.run_unittest(RatTestCase)
support.run_unittest(RatTestCase)
if __name__ == "__main__":

View file

@ -1,6 +1,6 @@
import sys
import unittest
from test import test_support
from test import support
from collections import UserList
# We do a bit of trickery here to be able to test both the C implementation
@ -286,15 +286,15 @@ def test_main(verbose=None):
TestInsortPython, TestInsortC,
TestErrorHandlingPython, TestErrorHandlingC]
test_support.run_unittest(*test_classes)
test_support.run_doctest(test_bisect, verbose)
support.run_unittest(*test_classes)
support.run_doctest(test_bisect, verbose)
# verify reference counting
if verbose and hasattr(sys, "gettotalrefcount"):
import gc
counts = [None] * 5
for i in range(len(counts)):
test_support.run_unittest(*test_classes)
support.run_unittest(*test_classes)
gc.collect()
counts[i] = sys.gettotalrefcount()
print(counts)

View file

@ -1,7 +1,7 @@
# Test properties of bool promised by PEP 285
import unittest
from test import test_support
from test import support
import os
@ -26,14 +26,14 @@ class C(bool):
def test_print(self):
try:
fo = open(test_support.TESTFN, "w")
fo = open(support.TESTFN, "w")
print(False, True, file=fo)
fo.close()
fo = open(test_support.TESTFN, "r")
fo = open(support.TESTFN, "r")
self.assertEqual(fo.read(), 'False True\n')
finally:
fo.close()
os.remove(test_support.TESTFN)
os.remove(support.TESTFN)
def test_repr(self):
self.assertEqual(repr(False), 'False')
@ -234,12 +234,12 @@ def test_boolean(self):
def test_fileclosed(self):
try:
f = open(test_support.TESTFN, "w")
f = open(support.TESTFN, "w")
self.assertIs(f.closed, False)
f.close()
self.assertIs(f.closed, True)
finally:
os.remove(test_support.TESTFN)
os.remove(support.TESTFN)
def test_operator(self):
import operator
@ -331,7 +331,7 @@ def __len__(self):
self.assertEqual(str(e_bool), str(e_len))
def test_main():
test_support.run_unittest(BoolTest)
support.run_unittest(BoolTest)
if __name__ == "__main__":
test_main()

View file

@ -7,7 +7,7 @@
import bsddb
import dbhash # Just so we know it's imported
import unittest
from test import test_support
from test import support
class TestBSDDB(unittest.TestCase):
openflag = 'c'
@ -274,7 +274,7 @@ def test_keyordering(self):
self.assertEqual(list(self.f), keys)
class TestBTree(TestBSDDB):
fname = test_support.TESTFN
fname = support.TESTFN
openmethod = [bsddb.btopen]
class TestBTree_InMemory(TestBSDDB):
@ -287,7 +287,7 @@ class TestBTree_InMemory_Truncate(TestBSDDB):
openmethod = [bsddb.btopen]
class TestHashTable(TestBSDDB):
fname = test_support.TESTFN
fname = support.TESTFN
openmethod = [bsddb.hashopen]
class TestHashTable_InMemory(TestBSDDB):
@ -299,7 +299,7 @@ class TestHashTable_InMemory(TestBSDDB):
## # Solaris Intel - rmasse 1/97
def test_main(verbose=None):
test_support.run_unittest(
support.run_unittest(
TestBTree,
TestHashTable,
TestBTree_InMemory,

View file

@ -7,7 +7,7 @@
import tempfile
import time
import unittest
from test.test_support import requires, verbose, run_unittest, unlink, rmtree
from test.support import requires, verbose, run_unittest, unlink, rmtree
# When running as a script instead of within the regrtest framework, skip the
# requires test, since it's obvious we want to run them.

View file

@ -1,5 +1,5 @@
import unittest
from test import test_support
from test import support
# Simple test to ensure that optimizations in fileobject.c deliver
# the expected results. For best testing, run this under a debug-build
@ -14,18 +14,18 @@ def try_one(self, s):
# .readline()s deliver what we wrote.
# Ensure we can open TESTFN for writing.
test_support.unlink(test_support.TESTFN)
support.unlink(support.TESTFN)
# Since C doesn't guarantee we can write/read arbitrary bytes in text
# files, use binary mode.
f = open(test_support.TESTFN, "wb")
f = open(support.TESTFN, "wb")
try:
# write once with \n and once without
f.write(s)
f.write(b"\n")
f.write(s)
f.close()
f = open(test_support.TESTFN, "rb")
f = open(support.TESTFN, "rb")
line = f.readline()
self.assertEqual(line, s + b"\n")
line = f.readline()
@ -34,7 +34,7 @@ def try_one(self, s):
self.assert_(not line) # Must be at EOF
f.close()
finally:
test_support.unlink(test_support.TESTFN)
support.unlink(support.TESTFN)
def drive_one(self, pattern):
for length in lengths:
@ -59,7 +59,7 @@ def test_nullpat(self):
self.drive_one(bytes(1000))
def test_main():
test_support.run_unittest(BufferSizeTest)
support.run_unittest(BufferSizeTest)
if __name__ == "__main__":
test_main()

View file

@ -1,7 +1,7 @@
# Python test set -- built-in functions
import test.test_support, unittest
from test.test_support import fcmp, TESTFN, unlink, run_unittest, \
import test.support, unittest
from test.support import fcmp, TESTFN, unlink, run_unittest, \
run_with_locale
from operator import neg

View file

@ -13,7 +13,7 @@
import tempfile
import unittest
import warnings
import test.test_support
import test.support
import test.string_tests
import test.buffer_tests
@ -969,13 +969,13 @@ def __init__(self, newarg=1, *args, **kwargs):
def test_main():
test.test_support.run_unittest(BytesTest)
test.test_support.run_unittest(ByteArrayTest)
test.test_support.run_unittest(AssortedBytesTest)
test.test_support.run_unittest(BytesAsStringTest)
test.test_support.run_unittest(ByteArrayAsStringTest)
test.test_support.run_unittest(ByteArraySubclassTest)
test.test_support.run_unittest(BytearrayPEP3137Test)
test.support.run_unittest(BytesTest)
test.support.run_unittest(ByteArrayTest)
test.support.run_unittest(AssortedBytesTest)
test.support.run_unittest(BytesAsStringTest)
test.support.run_unittest(ByteArrayAsStringTest)
test.support.run_unittest(ByteArraySubclassTest)
test.support.run_unittest(BytearrayPEP3137Test)
if __name__ == "__main__":
test_main()

View file

@ -1,6 +1,6 @@
#!/usr/bin/python
from test import test_support
from test.test_support import TESTFN
from test import support
from test.support import TESTFN
import unittest
from io import BytesIO
@ -333,13 +333,13 @@ def testDecompressIncomplete(self):
self.assertRaises(ValueError, bz2.decompress, self.DATA[:-10])
def test_main():
test_support.run_unittest(
support.run_unittest(
BZ2FileTest,
BZ2CompressorTest,
BZ2DecompressorTest,
FuncTest
)
test_support.reap_children()
support.reap_children()
if __name__ == '__main__':
test_main()

View file

@ -121,7 +121,7 @@ def __getattr__(self, name):
def test_main():
from test.test_support import TestSkipped
from test.support import TestSkipped
raise TestSkipped('test_cProfile test is current broken')

View file

@ -1,7 +1,7 @@
import calendar
import unittest
from test import test_support
from test import support
result_2004_text = """
@ -383,7 +383,7 @@ def test_december(self):
def test_main():
test_support.run_unittest(
support.run_unittest(
OutputTestCase,
CalendarTestCase,
MondayTestCase,

View file

@ -1,5 +1,5 @@
import unittest
from test import test_support
from test import support
# The test cases here cover several paths through the function calling
# code. They depend on the METH_XXX flag that is used to define a C
@ -124,7 +124,7 @@ def test_oldargs1_2_kw(self):
def test_main():
test_support.run_unittest(CFunctionCalls)
support.run_unittest(CFunctionCalls)
if __name__ == "__main__":

View file

@ -2,7 +2,7 @@
# these are all functions _testcapi exports whose name begins with 'test_'.
import sys
from test import test_support
from test import support
import _testcapi
def test_main():
@ -10,13 +10,13 @@ def test_main():
for name in dir(_testcapi):
if name.startswith('test_'):
test = getattr(_testcapi, name)
if test_support.verbose:
if support.verbose:
print("internal", name)
test()
# some extra thread-state tests driven via _testcapi
def TestThreadState():
if test_support.verbose:
if support.verbose:
print("auto-thread-state")
idents = []
@ -29,7 +29,7 @@ def callback():
time.sleep(1)
# Check our main thread is in the list exactly 3 times.
if idents.count(thread.get_ident()) != 3:
raise test_support.TestFailed(
raise support.TestFailed(
"Couldn't find main thread correctly in the list")
try:

View file

@ -3,7 +3,7 @@
import unittest
import collections
from test import test_support
from test import support
class SortedDict(collections.UserDict):
def items(self):
@ -251,7 +251,7 @@ class mystr(str):
cf.set("sect", "option2", "splat")
def test_read_returns_file_list(self):
file1 = test_support.findfile("cfgparser.1")
file1 = support.findfile("cfgparser.1")
# check when we pass a mix of readable and non-readable files:
cf = self.newconfig()
parsed_files = cf.read([file1, "nonexistant-file"])
@ -469,7 +469,7 @@ def test_sorted(self):
"o4 = 1\n\n")
def test_main():
test_support.run_unittest(
support.run_unittest(
ConfigParserTestCase,
RawConfigParserTestCase,
SafeConfigParserTestCase,

View file

@ -1,4 +1,4 @@
from test.test_support import run_unittest
from test.support import run_unittest
import cgi
import os
import sys

View file

@ -9,7 +9,7 @@
"""#"
import test.test_support, unittest
import test.support, unittest
import codecs
@ -50,7 +50,7 @@ def test_maptoundefined(self):
self.assertRaises(UnicodeError, str, b'abc\001', codecname)
def test_main():
test.test_support.run_unittest(CharmapCodecTest)
test.support.run_unittest(CharmapCodecTest)
if __name__ == "__main__":
test_main()

View file

@ -2,7 +2,7 @@
import unittest
from test import test_support
from test import support
testmeths = [
@ -555,7 +555,7 @@ class B(A):
hash(a.f)
def test_main():
test_support.run_unittest(ClassTests)
support.run_unittest(ClassTests)
if __name__=='__main__':
test_main()

View file

@ -1,4 +1,4 @@
from test.test_support import run_unittest
from test.support import run_unittest
from test.test_math import parse_testfile, test_file
import unittest
import os, sys

View file

@ -167,8 +167,8 @@ def do_exit(self, arg):
return True
def test_main(verbose=None):
from test import test_support, test_cmd
test_support.run_doctest(test_cmd, verbose)
from test import support, test_cmd
support.run_doctest(test_cmd, verbose)
def test_coverage(coverdir):
tracer=trace.Trace(ignoredirs=[sys.prefix, sys.exec_prefix,],

View file

@ -2,7 +2,7 @@
# All tests are executed with environment variables ignored
# See test_cmd_line_script.py for testing of script execution
import test.test_support, unittest
import test.support, unittest
import sys
import subprocess
@ -123,8 +123,8 @@ def test_run_code(self):
def test_main():
test.test_support.run_unittest(CmdLineTest)
test.test_support.reap_children()
test.support.run_unittest(CmdLineTest)
test.support.reap_children()
if __name__ == "__main__":
test_main()

View file

@ -4,7 +4,7 @@
import os
import os.path
import sys
import test.test_support
import test.support
import tempfile
import subprocess
import py_compile
@ -12,9 +12,9 @@
import shutil
import zipfile
verbose = test.test_support.verbose
verbose = test.support.verbose
# XXX ncoghlan: Should we consider moving these to test_support?
# XXX ncoghlan: Should we consider moving these to support?
from test.test_cmd_line import _spawn_python, _kill_python
def _run_python(*args):
@ -176,8 +176,8 @@ def test_module_in_package(self):
def test_main():
test.test_support.run_unittest(CmdLineTest)
test.test_support.reap_children()
test.support.run_unittest(CmdLineTest)
test.support.reap_children()
if __name__ == '__main__':
test_main()

View file

@ -119,7 +119,7 @@ def dump(co):
print("consts:", tuple(consts(co.co_consts)))
def test_main(verbose=None):
from test.test_support import run_doctest
from test.support import run_doctest
from test import test_code
run_doctest(test_code, verbose)

View file

@ -1,4 +1,4 @@
import test.test_support, unittest
import test.support, unittest
import sys, codecs, html.entities, unicodedata
class PosReturn:
@ -843,7 +843,7 @@ def mutating(exc):
self.assertRaises(TypeError, data.decode, encoding, "test.replacing")
def test_main():
test.test_support.run_unittest(CodecCallbackTest)
test.support.run_unittest(CodecCallbackTest)
if __name__ == "__main__":
test_main()

View file

@ -4,7 +4,7 @@
# Codec encoding tests for PRC encodings.
#
from test import test_support
from test import support
from test import test_multibytecodec_support
import unittest
@ -51,7 +51,7 @@ class Test_GB18030(test_multibytecodec_support.TestBase, unittest.TestCase):
has_iso10646 = True
def test_main():
test_support.run_unittest(__name__)
support.run_unittest(__name__)
if __name__ == "__main__":
test_main()

View file

@ -4,7 +4,7 @@
# Codec encoding tests for HongKong encodings.
#
from test import test_support
from test import support
from test import test_multibytecodec_support
import unittest
@ -21,7 +21,7 @@ class Test_Big5HKSCS(test_multibytecodec_support.TestBase, unittest.TestCase):
)
def test_main():
test_support.run_unittest(__name__)
support.run_unittest(__name__)
if __name__ == "__main__":
test_main()

View file

@ -4,7 +4,7 @@
# Codec encoding tests for Japanese encodings.
#
from test import test_support
from test import support
from test import test_multibytecodec_support
import unittest
@ -99,7 +99,7 @@ class Test_SJISX0213(test_multibytecodec_support.TestBase, unittest.TestCase):
)
def test_main():
test_support.run_unittest(__name__)
support.run_unittest(__name__)
if __name__ == "__main__":
test_main()

View file

@ -4,7 +4,7 @@
# Codec encoding tests for ROK encodings.
#
from test import test_support
from test import support
from test import test_multibytecodec_support
import unittest
@ -63,7 +63,7 @@ class Test_JOHAB(test_multibytecodec_support.TestBase, unittest.TestCase):
)
def test_main():
test_support.run_unittest(__name__)
support.run_unittest(__name__)
if __name__ == "__main__":
test_main()

View file

@ -4,7 +4,7 @@
# Codec encoding tests for ROC encodings.
#
from test import test_support
from test import support
from test import test_multibytecodec_support
import unittest
@ -21,7 +21,7 @@ class Test_Big5(test_multibytecodec_support.TestBase, unittest.TestCase):
)
def test_main():
test_support.run_unittest(__name__)
support.run_unittest(__name__)
if __name__ == "__main__":
test_main()

View file

@ -4,7 +4,7 @@
# Codec mapping tests for PRC encodings
#
from test import test_support
from test import support
from test import test_multibytecodec_support
import unittest
@ -27,7 +27,7 @@ class TestGB18030Map(test_multibytecodec_support.TestBase_Mapping,
def test_main():
test_support.run_unittest(__name__)
support.run_unittest(__name__)
if __name__ == "__main__":
test_main()

View file

@ -4,7 +4,7 @@
# Codec mapping tests for HongKong encodings
#
from test import test_support
from test import support
from test import test_multibytecodec_support
import unittest
@ -14,8 +14,8 @@ class TestBig5HKSCSMap(test_multibytecodec_support.TestBase_Mapping,
mapfileurl = 'http://people.freebsd.org/~perky/i18n/BIG5HKSCS-2004.TXT'
def test_main():
test_support.run_unittest(__name__)
support.run_unittest(__name__)
if __name__ == "__main__":
test_support.use_resources = ['urlfetch']
support.use_resources = ['urlfetch']
test_main()

View file

@ -4,7 +4,7 @@
# Codec mapping tests for Japanese encodings
#
from test import test_support
from test import support
from test import test_multibytecodec_support
import unittest
@ -61,7 +61,7 @@ class TestSJISX0213Map(test_multibytecodec_support.TestBase_Mapping,
def test_main():
test_support.run_unittest(__name__)
support.run_unittest(__name__)
if __name__ == "__main__":
test_main()

View file

@ -4,7 +4,7 @@
# Codec mapping tests for ROK encodings
#
from test import test_support
from test import support
from test import test_multibytecodec_support
import unittest
@ -38,7 +38,7 @@ class TestJOHABMap(test_multibytecodec_support.TestBase_Mapping,
pass_dectest = [(b'\\', '\u20a9')]
def test_main():
test_support.run_unittest(__name__)
support.run_unittest(__name__)
if __name__ == "__main__":
test_main()

View file

@ -4,7 +4,7 @@
# Codec mapping tests for ROC encodings
#
from test import test_support
from test import support
from test import test_multibytecodec_support
import unittest
@ -25,7 +25,7 @@ class TestCP950Map(test_multibytecodec_support.TestBase_Mapping,
]
def test_main():
test_support.run_unittest(__name__)
support.run_unittest(__name__)
if __name__ == "__main__":
test_main()

View file

@ -1,4 +1,4 @@
from test import test_support
from test import support
import unittest
import codecs
import sys, _testcapi, io
@ -1032,7 +1032,7 @@ def test_nameprep(self):
try:
self.assertEquals(nameprep(orig), prepped)
except Exception as e:
raise test_support.TestFailed("Test 3.%d: %s" % (pos+1, str(e)))
raise support.TestFailed("Test 3.%d: %s" % (pos+1, str(e)))
class IDNACodecTest(unittest.TestCase):
def test_builtin_decode(self):
@ -1477,7 +1477,7 @@ def test_streamreaderwriter(self):
def test_main():
test_support.run_unittest(
support.run_unittest(
UTF32Test,
UTF32LETest,
UTF32BETest,

View file

@ -3,7 +3,7 @@
Nick Mathewson
"""
import unittest
from test.test_support import run_unittest, is_jython
from test.support import run_unittest, is_jython
from codeop import compile_command, PyCF_DONT_IMPLY_DEDENT
import io

View file

@ -1,6 +1,6 @@
import test.test_support, unittest
from test.test_support import TESTFN, unlink
import test.support, unittest
from test.support import TESTFN, unlink
import os, sys
class CodingTest(unittest.TestCase):
@ -50,7 +50,7 @@ def test_file_parse(self):
sys.path.pop(0)
def test_main():
test.test_support.run_unittest(CodingTest)
test.support.run_unittest(CodingTest)
if __name__ == "__main__":
test_main()

View file

@ -1,7 +1,7 @@
"""Unit tests for collections.py."""
import unittest, doctest
from test import test_support
from test import support
from collections import namedtuple
from collections import Hashable, Iterable, Iterator
from collections import Sized, Container, Callable
@ -321,8 +321,8 @@ def test_MutableSequence(self):
def test_main(verbose=None):
NamedTupleDocs = doctest.DocTestSuite(module=collections)
test_classes = [TestNamedTuple, NamedTupleDocs, TestOneTrickPonyABCs, TestCollectionABCs]
test_support.run_unittest(*test_classes)
test_support.run_doctest(collections, verbose)
support.run_unittest(*test_classes)
support.run_doctest(collections, verbose)
if __name__ == "__main__":

View file

@ -1,4 +1,4 @@
import unittest, test.test_support
import unittest, test.support
import colorsys
def frange(start, stop, step):
@ -70,7 +70,7 @@ def test_hls_values(self):
self.assertTripleEqual(rgb, colorsys.hls_to_rgb(*hls))
def test_main():
test.test_support.run_unittest(ColorsysTest)
test.support.run_unittest(ColorsysTest)
if __name__ == "__main__":
test_main()

View file

@ -5,7 +5,7 @@
import unittest
import os, tempfile, re
from test.test_support import TestSkipped, run_unittest, reap_children
from test.support import TestSkipped, run_unittest, reap_children
from commands import *
# The module says:

View file

@ -1,5 +1,5 @@
import unittest
from test import test_support
from test import support
class Empty:
def __repr__(self):
@ -61,7 +61,7 @@ def test_issue_1393(self):
def test_main():
test_support.run_unittest(ComparisonTest)
support.run_unittest(ComparisonTest)
if __name__ == '__main__':
test_main()

View file

@ -1,7 +1,7 @@
import unittest
import sys
import _ast
from test import test_support
from test import support
class TestSpecifics(unittest.TestCase):
@ -444,7 +444,7 @@ def test_compile_ast(self):
def test_main():
test_support.run_unittest(TestSpecifics)
support.run_unittest(TestSpecifics)
if __name__ == "__main__":
test_main()

View file

@ -1,5 +1,5 @@
import unittest, os
from test import test_support
from test import support
from random import random
from math import atan2
@ -339,16 +339,16 @@ def test_file(self):
fo = None
try:
fo = open(test_support.TESTFN, "w")
fo = open(support.TESTFN, "w")
print(a, b, file=fo)
fo.close()
fo = open(test_support.TESTFN, "r")
fo = open(support.TESTFN, "r")
self.assertEqual(fo.read(), ("%s %s\n" % (a, b)))
finally:
if (fo is not None) and (not fo.closed):
fo.close()
try:
os.remove(test_support.TESTFN)
os.remove(support.TESTFN)
except (OSError, IOError):
pass
@ -360,7 +360,7 @@ def test_plus_minus_0j(self):
self.assertEquals(atan2(z2.imag, -1.), atan2(-0., -1.))
def test_main():
test_support.run_unittest(ComplexTest)
support.run_unittest(ComplexTest)
if __name__ == "__main__":
test_main()

View file

@ -1,4 +1,4 @@
from test.test_support import run_unittest
from test.support import run_unittest
import unittest

View file

@ -8,7 +8,7 @@
import unittest
import threading
from contextlib import * # Tests __all__
from test import test_support
from test import support
class ContextManagerTestCase(unittest.TestCase):
@ -331,7 +331,7 @@ def locked():
# This is needed to make the test actually run under regrtest.py!
def test_main():
test_support.run_unittest(__name__)
support.run_unittest(__name__)
if __name__ == "__main__":
test_main()

View file

@ -1,6 +1,6 @@
# Simple test suite for Cookie.py
from test.test_support import run_unittest, run_doctest
from test.support import run_unittest, run_doctest
import unittest
import Cookie

View file

@ -3,7 +3,7 @@
import re, os, time
from unittest import TestCase
from test import test_support
from test import support
class DateTimeTests(TestCase):
@ -234,7 +234,7 @@ class FileCookieJarTests(TestCase):
def test_lwp_valueless_cookie(self):
# cookies with no value should be saved and loaded consistently
from cookielib import LWPCookieJar
filename = test_support.TESTFN
filename = support.TESTFN
c = LWPCookieJar()
interact_netscape(c, "http://www.acme.com/", 'boo')
self.assertEqual(c._cookies["www.acme.com"]["/"]["boo"].value, None)
@ -250,7 +250,7 @@ def test_lwp_valueless_cookie(self):
def test_bad_magic(self):
from cookielib import LWPCookieJar, MozillaCookieJar, LoadError
# IOErrors (eg. file doesn't exist) are allowed to propagate
filename = test_support.TESTFN
filename = support.TESTFN
for cookiejar_class in LWPCookieJar, MozillaCookieJar:
c = cookiejar_class()
try:
@ -356,7 +356,7 @@ def test_missing_value(self):
# missing = sign in Cookie: header is regarded by Mozilla as a missing
# name, and by cookielib as a missing value
filename = test_support.TESTFN
filename = support.TESTFN
c = MozillaCookieJar(filename)
interact_netscape(c, "http://www.acme.com/", 'eggs')
interact_netscape(c, "http://www.acme.com/", '"spam"; path=/foo/')
@ -1505,7 +1505,7 @@ def test_rejection(self):
self.assertEquals(len(c), 6)
# save and restore
filename = test_support.TESTFN
filename = support.TESTFN
try:
c.save(filename, ignore_discard=True)
@ -1547,7 +1547,7 @@ def test_mozilla(self):
year_plus_one = time.localtime()[0] + 1
filename = test_support.TESTFN
filename = support.TESTFN
c = MozillaCookieJar(filename,
policy=DefaultCookiePolicy(rfc2965=True))
@ -1722,7 +1722,7 @@ def test_session_cookies(self):
def test_main(verbose=None):
test_support.run_unittest(
support.run_unittest(
DateTimeTests,
HeaderTests,
CookieTests,

View file

@ -4,7 +4,7 @@
import copyreg
import unittest
from test import test_support
from test import support
class TestCopy(unittest.TestCase):
@ -50,7 +50,7 @@ class C(object):
def __reduce_ex__(self, proto):
return ""
def __reduce__(self):
raise test_support.TestFailed("shouldn't call this")
raise support.TestFailed("shouldn't call this")
x = C()
y = copy.copy(x)
self.assert_(y is x)
@ -223,7 +223,7 @@ class C(object):
def __reduce_ex__(self, proto):
return ""
def __reduce__(self):
raise test_support.TestFailed("shouldn't call this")
raise support.TestFailed("shouldn't call this")
x = C()
y = copy.deepcopy(x)
self.assert_(y is x)
@ -584,7 +584,7 @@ def foo(x, y): return x+y
def global_foo(x, y): return x+y
def test_main():
test_support.run_unittest(TestCopy)
support.run_unittest(TestCopy)
if __name__ == "__main__":
test_main()

View file

@ -1,7 +1,7 @@
import copyreg
import unittest
from test import test_support
from test import support
from test.pickletester import ExtensionSaver
class C:
@ -114,7 +114,7 @@ def test_slotnames(self):
def test_main():
test_support.run_unittest(CopyRegTestCase)
support.run_unittest(CopyRegTestCase)
if __name__ == "__main__":

View file

@ -1,4 +1,4 @@
from test import test_support
from test import support
import unittest
import crypt
@ -6,11 +6,11 @@ class CryptTestCase(unittest.TestCase):
def test_crypt(self):
c = crypt.crypt('mypassword', 'ab')
if test_support.verbose:
if support.verbose:
print('Test encryption: ', c)
def test_main():
test_support.run_unittest(CryptTestCase)
support.run_unittest(CryptTestCase)
if __name__ == "__main__":
test_main()

View file

@ -10,7 +10,7 @@
from tempfile import TemporaryFile
import csv
import gc
from test import test_support
from test import support
class Test_Csv(unittest.TestCase):
"""
@ -790,7 +790,7 @@ def test_delimiters(self):
self.assertEqual(dialect.quotechar, "'")
if not hasattr(sys, "gettotalrefcount"):
if test_support.verbose: print("*** skipping leakage tests ***")
if support.verbose: print("*** skipping leakage tests ***")
else:
class NUL:
def write(s, *args):
@ -891,7 +891,7 @@ def test_unicode_write(self):
def test_main():
mod = sys.modules[__name__]
test_support.run_unittest(
support.run_unittest(
*[getattr(mod, name) for name in dir(mod) if name.startswith('Test')]
)

View file

@ -1,6 +1,6 @@
import unittest
from test.test_support import run_unittest
from test.support import run_unittest
import ctypes.test
def test_main():

Some files were not shown because too many files have changed in this diff Show more