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-54781: Move Lib/lib2to3/tests/ to Lib/test/test_lib2to3/#94049

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 4 commits intopython:mainfromvstinner:test_lib2to3
Jun 21, 2022
Merged
Show file tree
Hide file tree
Changes from1 commit
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
PrevPrevious commit
NextNext commit
Update includes
  • Loading branch information
@vstinner
vstinner committedJun 21, 2022
commitfe2f82a7ef9a6aecee3dc1e220bf75d289cb2d0e
6 changes: 3 additions & 3 deletionsLib/test/test_lib2to3/pytree_idempotency.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -17,9 +17,9 @@
import logging

# Local imports
from.. import pytree
from.. import pgen2
from..pgen2 import driver
fromlib2to3 import pytree
fromlib2to3 import pgen2
fromlib2to3.pgen2 import driver

logging.basicConfig()

Expand Down
4 changes: 3 additions & 1 deletionLib/test/test_lib2to3/support.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,12 +8,14 @@
from textwrap import dedent

# Local imports
import lib2to3
from lib2to3 import pytree, refactor
from lib2to3.pgen2 import driver as pgen2_driver

lib2to3_dir = os.path.dirname(lib2to3.__file__)
test_dir = os.path.dirname(__file__)
proj_dir = os.path.normpath(os.path.join(test_dir, ".."))
grammar_path = os.path.join(test_dir, "..", "Grammar.txt")
grammar_path = os.path.join(lib2to3_dir, "Grammar.txt")
grammar = pgen2_driver.load_grammar(grammar_path)
grammar_no_print_statement = pgen2_driver.load_grammar(grammar_path)
del grammar_no_print_statement.keywords["print"]
Expand Down
12 changes: 6 additions & 6 deletionsLib/test/test_lib2to3/test_fixers.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,7 +7,7 @@

# Local imports
from lib2to3 import pygram, fixer_util
fromlib2to3.tests import support
fromtest.test_lib2to3 import support


class FixerTestCase(support.TestCase):
Expand DownExpand Up@@ -1791,7 +1791,7 @@ def f():

class Test_imports(FixerTestCase, ImportsFixerTests):
fixer = "imports"
from..fixes.fix_imports import MAPPING as modules
fromlib2to3.fixes.fix_imports import MAPPING as modules

def test_multiple_imports(self):
b = """import urlparse, cStringIO"""
Expand All@@ -1812,16 +1812,16 @@ def test_multiple_imports_as(self):

class Test_imports2(FixerTestCase, ImportsFixerTests):
fixer = "imports2"
from..fixes.fix_imports2 import MAPPING as modules
fromlib2to3.fixes.fix_imports2 import MAPPING as modules


class Test_imports_fixer_order(FixerTestCase, ImportsFixerTests):

def setUp(self):
super(Test_imports_fixer_order, self).setUp(['imports', 'imports2'])
from..fixes.fix_imports2 import MAPPING as mapping2
fromlib2to3.fixes.fix_imports2 import MAPPING as mapping2
self.modules = mapping2.copy()
from..fixes.fix_imports import MAPPING as mapping1
fromlib2to3.fixes.fix_imports import MAPPING as mapping1
for key in ('dbhash', 'dumbdbm', 'dbm', 'gdbm'):
self.modules[key] = mapping1[key]

Expand All@@ -1833,7 +1833,7 @@ def test_after_local_imports_refactoring(self):

class Test_urllib(FixerTestCase):
fixer = "urllib"
from..fixes.fix_urllib import MAPPING as modules
fromlib2to3.fixes.fix_urllib import MAPPING as modules

def test_import_module(self):
for old, changes in self.modules.items():
Expand Down
2 changes: 1 addition & 1 deletionLib/test/test_lib2to3/test_parser.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -26,7 +26,7 @@
# Local imports
from lib2to3.pgen2 import driver as pgen2_driver
from lib2to3.pgen2 import tokenize
from..pgen2.parse import ParseError
fromlib2to3.pgen2.parse import ParseError
from lib2to3.pygram import python_symbols as syms


Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp