mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
#2621 rename test.test_support to test.support
This commit is contained in:
parent
6a654814ea
commit
ee8712cda4
358 changed files with 1308 additions and 1307 deletions
|
@ -60,7 +60,7 @@ two trailing blanks apparent in the expected output.
|
|||
... " print(x)\\n")
|
||||
True
|
||||
|
||||
>>> f = test_support.findfile("tokenize_tests.txt")
|
||||
>>> f = support.findfile("tokenize_tests.txt")
|
||||
>>> roundtrip(open(f, 'rb'))
|
||||
True
|
||||
|
||||
|
@ -522,7 +522,7 @@ pass the '-ucompiler' option to process the full directory.
|
|||
>>> tempdir = os.path.dirname(f) or os.curdir
|
||||
>>> testfiles = glob.glob(os.path.join(tempdir, "test*.py"))
|
||||
|
||||
>>> if not test_support.is_resource_enabled("compiler"):
|
||||
>>> if not support.is_resource_enabled("compiler"):
|
||||
... testfiles = random.sample(testfiles, 10)
|
||||
...
|
||||
>>> for testfile in testfiles:
|
||||
|
@ -533,7 +533,7 @@ pass the '-ucompiler' option to process the full directory.
|
|||
True
|
||||
"""
|
||||
|
||||
from test import test_support
|
||||
from test import support
|
||||
from tokenize import (tokenize, _tokenize, untokenize, NUMBER, NAME, OP,
|
||||
STRING, ENDMARKER, tok_name, detect_encoding)
|
||||
from io import BytesIO
|
||||
|
@ -842,11 +842,11 @@ __test__ = {"doctests" : doctests, 'decistmt': decistmt}
|
|||
|
||||
def test_main():
|
||||
from test import test_tokenize
|
||||
test_support.run_doctest(test_tokenize, True)
|
||||
test_support.run_unittest(TestTokenizerAdheresToPep0263)
|
||||
test_support.run_unittest(Test_Tokenize)
|
||||
test_support.run_unittest(TestDetectEncoding)
|
||||
test_support.run_unittest(TestTokenize)
|
||||
support.run_doctest(test_tokenize, True)
|
||||
support.run_unittest(TestTokenizerAdheresToPep0263)
|
||||
support.run_unittest(Test_Tokenize)
|
||||
support.run_unittest(TestDetectEncoding)
|
||||
support.run_unittest(TestTokenize)
|
||||
|
||||
if __name__ == "__main__":
|
||||
test_main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue