File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 99# deterministic.
1010
1111from test .support import sortdict
12- import pprint
1312import doctest
1413import unittest
1514
@@ -167,6 +166,7 @@ def merge(self, other):
167166
168167You can get the information from the list type:
169168
169+ >>> import pprint
170170 >>> pprint.pprint(dir(list)) # like list.__dict__.keys(), but sorted
171171 ['__add__',
172172 '__class__',
Original file line number Diff line number Diff line change 44
55from test import support
66from test .support import import_helper
7- from test .support import os_helper
87import doctest
98import functools
109import os
1413import importlib .util
1514import unittest
1615import tempfile
17- import shutil
1816import types
1917import contextlib
2018
@@ -461,7 +459,7 @@ def basics(): r"""
461459 >>> tests = finder.find(sample_func)
462460
463461 >>> print(tests) # doctest: +ELLIPSIS
464- [<DocTest sample_func from test_doctest.py:34 (1 example)>]
462+ [<DocTest sample_func from test_doctest.py:32 (1 example)>]
465463
466464The exact name depends on how test_doctest was invoked, so allow for
467465leading path components.
@@ -2811,6 +2809,8 @@ def test_lineendings(): r"""
28112809at least one of the line endings will raise a ValueError for inconsistent
28122810whitespace if doctest does not correctly do the newline conversion.
28132811
2812+ >>> from test.support import os_helper
2813+ >>> import shutil
28142814 >>> dn = tempfile.mkdtemp()
28152815 >>> pkg = os.path.join(dn, "doctest_testpkg")
28162816 >>> os.mkdir(pkg)
Original file line number Diff line number Diff line change 88
99We're defining four helper functions
1010
11+ >>> from test import support
1112 >>> def e(a,b):
1213 ... print(a, b)
1314
522523
523524import doctest
524525import unittest
525- from test import support
526526
527527def load_tests (loader , tests , pattern ):
528528 tests .addTest (doctest .DocTestSuite ())
You can’t perform that action at this time.
0 commit comments