Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-84623: Move imports in doctests#94133

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
vstinner merged 1 commit intopython:mainfromvstinner:unused_idle
Jun 22, 2022
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletionLib/test/test_descrtut.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,7 +9,6 @@
# deterministic.

from test.support import sortdict
import pprint
import doctest
import unittest

Expand DownExpand Up@@ -167,6 +166,7 @@ def merge(self, other):

You can get the information from the list type:

>>> import pprint
>>> pprint.pprint(dir(list)) # like list.__dict__.keys(), but sorted
['__add__',
'__class__',
Expand Down
6 changes: 3 additions & 3 deletionsLib/test/test_doctest.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,7 +4,6 @@

from test import support
from test.support import import_helper
from test.support import os_helper
import doctest
import functools
import os
Expand All@@ -14,7 +13,6 @@
import importlib.util
import unittest
import tempfile
import shutil
import types
import contextlib

Expand DownExpand Up@@ -461,7 +459,7 @@ def basics(): r"""
>>> tests = finder.find(sample_func)

>>> print(tests) # doctest: +ELLIPSIS
[<DocTest sample_func from test_doctest.py:34 (1 example)>]
[<DocTest sample_func from test_doctest.py:32 (1 example)>]

The exact name depends on how test_doctest was invoked, so allow for
leading path components.
Expand DownExpand Up@@ -2811,6 +2809,8 @@ def test_lineendings(): r"""
at least one of the line endings will raise a ValueError for inconsistent
whitespace if doctest does not correctly do the newline conversion.

>>> from test.support import os_helper
>>> import shutil
>>> dn = tempfile.mkdtemp()
>>> pkg = os.path.join(dn, "doctest_testpkg")
>>> os.mkdir(pkg)
Expand Down
2 changes: 1 addition & 1 deletionLib/test/test_extcall.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,6 +8,7 @@

We're defining four helper functions

>>> from test import support
>>> def e(a,b):
... print(a, b)

Expand DownExpand Up@@ -522,7 +523,6 @@

import doctest
import unittest
from test import support

def load_tests(loader, tests, pattern):
tests.addTest(doctest.DocTestSuite())
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp