mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
parent
37917369d5
commit
1e8ee9b380
45 changed files with 6 additions and 48 deletions
|
@ -54,7 +54,7 @@ of 'x' ('_b_base_' is either None, or the root object owning the memory block):
|
||||||
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
import unittest, doctest, sys
|
import unittest, doctest
|
||||||
|
|
||||||
import ctypes.test.test_objects
|
import ctypes.test.test_objects
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import unittest, sys
|
import unittest
|
||||||
from ctypes.test import need_symbol
|
from ctypes.test import need_symbol
|
||||||
|
|
||||||
class SimpleTypesTestCase(unittest.TestCase):
|
class SimpleTypesTestCase(unittest.TestCase):
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import unittest
|
import unittest
|
||||||
from ctypes import *
|
from ctypes import *
|
||||||
import os
|
|
||||||
|
|
||||||
import _ctypes_test
|
import _ctypes_test
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
from ctypes import *
|
from ctypes import *
|
||||||
|
|
||||||
import sys
|
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ import unittest
|
||||||
import array
|
import array
|
||||||
import io
|
import io
|
||||||
import pickle
|
import pickle
|
||||||
import sys
|
|
||||||
|
|
||||||
class UnseekableIO(io.FileIO):
|
class UnseekableIO(io.FileIO):
|
||||||
def tell(self):
|
def tell(self):
|
||||||
|
|
|
@ -3,7 +3,6 @@ and friends."""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import sys
|
|
||||||
import tempfile
|
import tempfile
|
||||||
from subprocess import *
|
from subprocess import *
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,6 @@ from test.support import findfile, TESTFN, unlink
|
||||||
import unittest
|
import unittest
|
||||||
from test import audiotests
|
from test import audiotests
|
||||||
from audioop import byteswap
|
from audioop import byteswap
|
||||||
import os
|
|
||||||
import io
|
import io
|
||||||
import sys
|
import sys
|
||||||
import struct
|
import struct
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
Based on an original test by Roger E. Masse.
|
Based on an original test by Roger E. Masse.
|
||||||
"""
|
"""
|
||||||
import binhex
|
import binhex
|
||||||
import os
|
|
||||||
import unittest
|
import unittest
|
||||||
from test import support
|
from test import support
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
import copy
|
import copy
|
||||||
import io
|
import io
|
||||||
import sys
|
import sys
|
||||||
import os
|
|
||||||
import unittest
|
import unittest
|
||||||
from io import StringIO
|
from io import StringIO
|
||||||
from tempfile import TemporaryFile
|
from tempfile import TemporaryFile
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
"""Test script for the dbm.open function based on testdumbdbm.py"""
|
"""Test script for the dbm.open function based on testdumbdbm.py"""
|
||||||
|
|
||||||
import os
|
|
||||||
import unittest
|
import unittest
|
||||||
import glob
|
import glob
|
||||||
import test.support
|
import test.support
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
from test import support
|
from test import support
|
||||||
support.import_module("dbm.ndbm") #skip if not supported
|
support.import_module("dbm.ndbm") #skip if not supported
|
||||||
import unittest
|
import unittest
|
||||||
import os
|
|
||||||
import random
|
import random
|
||||||
import dbm.ndbm
|
import dbm.ndbm
|
||||||
from dbm.ndbm import error
|
from dbm.ndbm import error
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
import os
|
import os
|
||||||
import random
|
import random
|
||||||
import select
|
import select
|
||||||
import sys
|
|
||||||
import unittest
|
import unittest
|
||||||
from test.support import TESTFN, run_unittest, cpython_only
|
from test.support import TESTFN, run_unittest, cpython_only
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import os
|
import os
|
||||||
import signal
|
import signal
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from test import support
|
from test import support
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
import unittest
|
import unittest
|
||||||
import collections
|
import collections
|
||||||
import email
|
import email
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
"""Unittests for heapq."""
|
"""Unittests for heapq."""
|
||||||
|
|
||||||
import sys
|
|
||||||
import random
|
import random
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
from importlib import _bootstrap_external
|
from importlib import _bootstrap_external
|
||||||
import sys
|
|
||||||
from test import support
|
from test import support
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@ from .. import util
|
||||||
machinery = util.import_importlib('importlib.machinery')
|
machinery = util.import_importlib('importlib.machinery')
|
||||||
|
|
||||||
import collections
|
import collections
|
||||||
import sys
|
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,6 @@ from .. import util
|
||||||
|
|
||||||
machinery = util.import_importlib('importlib.machinery')
|
machinery = util.import_importlib('importlib.machinery')
|
||||||
|
|
||||||
|
|
||||||
import sys
|
|
||||||
from test.support import captured_stdout
|
from test.support import captured_stdout
|
||||||
import types
|
import types
|
||||||
import unittest
|
import unittest
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
"""Test relative imports (PEP 328)."""
|
"""Test relative imports (PEP 328)."""
|
||||||
from .. import util
|
from .. import util
|
||||||
import sys
|
|
||||||
import unittest
|
import unittest
|
||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@ importlib = util.import_importlib('importlib')
|
||||||
machinery = util.import_importlib('importlib.machinery')
|
machinery = util.import_importlib('importlib.machinery')
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
from test import support as test_support
|
from test import support as test_support
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
import json
|
import json
|
||||||
import doctest
|
import doctest
|
||||||
import unittest
|
import unittest
|
||||||
|
|
|
@ -5,7 +5,6 @@ import errno
|
||||||
import os
|
import os
|
||||||
import select
|
import select
|
||||||
import socket
|
import socket
|
||||||
import sys
|
|
||||||
import time
|
import time
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
""" Test suite for the code in msilib """
|
""" Test suite for the code in msilib """
|
||||||
import unittest
|
import unittest
|
||||||
import os
|
|
||||||
from test.support import import_module
|
from test.support import import_module
|
||||||
msilib = import_module('msilib')
|
msilib = import_module('msilib')
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
from test import support
|
from test import support
|
||||||
from test.support import TESTFN
|
from test.support import TESTFN
|
||||||
import unittest, io, codecs, sys, os
|
import unittest, io, codecs, sys
|
||||||
import _multibytecodec
|
import _multibytecodec
|
||||||
|
|
||||||
ALL_CJKENCODINGS = [
|
ALL_CJKENCODINGS = [
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
from test import support
|
from test import support
|
||||||
import unittest
|
import unittest
|
||||||
import sys
|
|
||||||
|
|
||||||
# Skip test if nis module does not exist.
|
# Skip test if nis module does not exist.
|
||||||
nis = support.import_module('nis')
|
nis = support.import_module('nis')
|
||||||
|
|
|
@ -3,7 +3,6 @@ import unittest
|
||||||
|
|
||||||
from http.client import HTTPException
|
from http.client import HTTPException
|
||||||
import sys
|
import sys
|
||||||
import os
|
|
||||||
from unicodedata import normalize, unidata_version
|
from unicodedata import normalize, unidata_version
|
||||||
|
|
||||||
TESTDATAFILE = "NormalizationTest.txt"
|
TESTDATAFILE = "NormalizationTest.txt"
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import parser
|
import parser
|
||||||
import unittest
|
import unittest
|
||||||
import sys
|
|
||||||
import operator
|
import operator
|
||||||
import struct
|
import struct
|
||||||
from test import support
|
from test import support
|
||||||
|
|
|
@ -2,7 +2,6 @@ import builtins
|
||||||
import os
|
import os
|
||||||
import select
|
import select
|
||||||
import socket
|
import socket
|
||||||
import sys
|
|
||||||
import unittest
|
import unittest
|
||||||
import errno
|
import errno
|
||||||
from errno import EEXIST
|
from errno import EEXIST
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import itertools
|
import itertools
|
||||||
import os
|
import os
|
||||||
import posixpath
|
import posixpath
|
||||||
import sys
|
|
||||||
import unittest
|
import unittest
|
||||||
import warnings
|
import warnings
|
||||||
from posixpath import realpath, abspath, dirname, basename
|
from posixpath import realpath, abspath, dirname, basename
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import io
|
import io
|
||||||
import unittest
|
import unittest
|
||||||
import sys
|
|
||||||
import xml.sax
|
import xml.sax
|
||||||
|
|
||||||
from xml.sax.xmlreader import AttributesImpl
|
from xml.sax.xmlreader import AttributesImpl
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
import sys, os, io, subprocess
|
import sys, io, subprocess
|
||||||
import quopri
|
import quopri
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
from test import support
|
from test import support
|
||||||
import random
|
import random
|
||||||
import sys
|
|
||||||
import unittest
|
import unittest
|
||||||
from functools import cmp_to_key
|
from functools import cmp_to_key
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@ import time
|
||||||
import locale
|
import locale
|
||||||
import re
|
import re
|
||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
from test import support
|
from test import support
|
||||||
from datetime import date as datetime_date
|
from datetime import date as datetime_date
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
"""Tests for the md5sum script in the Tools directory."""
|
"""Tests for the md5sum script in the Tools directory."""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
import unittest
|
import unittest
|
||||||
from test import support
|
from test import support
|
||||||
from test.support.script_helper import assert_python_ok, assert_python_failure
|
from test.support.script_helper import assert_python_ok, assert_python_failure
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
"""Tests for the pdeps script in the Tools directory."""
|
"""Tests for the pdeps script in the Tools directory."""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
import unittest
|
import unittest
|
||||||
import tempfile
|
import tempfile
|
||||||
from test import support
|
from test import support
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import os
|
|
||||||
import unittest
|
import unittest
|
||||||
from test import support
|
from test import support
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import os
|
|
||||||
from test import support
|
from test import support
|
||||||
|
|
||||||
# Skip this test if _tkinter does not exist.
|
# Skip this test if _tkinter does not exist.
|
||||||
|
|
|
@ -352,7 +352,6 @@ Some size constraints (all fail.)
|
||||||
__test__ = {'doctests' : doctests}
|
__test__ = {'doctests' : doctests}
|
||||||
|
|
||||||
def test_main(verbose=False):
|
def test_main(verbose=False):
|
||||||
import sys
|
|
||||||
from test import support
|
from test import support
|
||||||
from test import test_unpack_ex
|
from test import test_unpack_ex
|
||||||
support.run_doctest(test_unpack_ex, verbose)
|
support.run_doctest(test_unpack_ex, verbose)
|
||||||
|
|
|
@ -4,7 +4,6 @@ from test import support
|
||||||
import contextlib
|
import contextlib
|
||||||
import socket
|
import socket
|
||||||
import urllib.request
|
import urllib.request
|
||||||
import sys
|
|
||||||
import os
|
import os
|
||||||
import email.message
|
import email.message
|
||||||
import time
|
import time
|
||||||
|
|
|
@ -3,9 +3,7 @@ from weakref import proxy, ref, WeakSet
|
||||||
import operator
|
import operator
|
||||||
import copy
|
import copy
|
||||||
import string
|
import string
|
||||||
import os
|
|
||||||
from random import randrange, shuffle
|
from random import randrange, shuffle
|
||||||
import sys
|
|
||||||
import warnings
|
import warnings
|
||||||
import collections
|
import collections
|
||||||
from collections import UserString as ustr
|
from collections import UserString as ustr
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# xml.etree test for cElementTree
|
# xml.etree test for cElementTree
|
||||||
import sys, struct
|
import struct
|
||||||
from test import support
|
from test import support
|
||||||
from test.support import import_fresh_module
|
from test.support import import_fresh_module
|
||||||
import types
|
import types
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import collections.abc
|
import collections.abc
|
||||||
import errno
|
import errno
|
||||||
import socket
|
import socket
|
||||||
import sys
|
|
||||||
import unittest
|
import unittest
|
||||||
from test import support
|
from test import support
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import contextlib
|
import contextlib
|
||||||
import io
|
import io
|
||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
import importlib.util
|
import importlib.util
|
||||||
import posixpath
|
import posixpath
|
||||||
import time
|
import time
|
||||||
|
|
|
@ -7,7 +7,6 @@ Extensions also should live in packages following the same rule as above.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
import unittest
|
import unittest
|
||||||
import importlib
|
import importlib
|
||||||
import test.support
|
import test.support
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
import sys
|
|
||||||
|
|
||||||
def is_instance(obj, klass):
|
def is_instance(obj, klass):
|
||||||
"""Version of is_instance that doesn't access __class__"""
|
"""Version of is_instance that doesn't access __class__"""
|
||||||
return issubclass(type(obj), klass)
|
return issubclass(type(obj), klass)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue