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
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
all_project_files(): use different paths
Sort file to make the tests more reproducible.
  • Loading branch information
@vstinner
vstinner committedJun 21, 2022
commit741a8d1e59c4298d961f9c3241b9bc936a675ce7
17 changes: 13 additions & 4 deletionsLib/test/test_lib2to3/support.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -51,10 +51,19 @@ def get_refactorer(fixer_pkg="lib2to3", fixers=None, options=None):
options = options or {}
return refactor.RefactoringTool(fixers, options, explicit=True)

defall_project_files():
for dirpath, dirnames, filenames in os.walk(proj_dir):
def_all_project_files(root, files):
for dirpath, dirnames, filenames in os.walk(root):
for filename in filenames:
if filename.endswith(".py"):
yield os.path.join(dirpath, filename)
if not filename.endswith(".py"):
continue
files.append(os.path.join(dirpath, filename))

def all_project_files():
files = []
_all_project_files(lib2to3_dir, files)
_all_project_files(test_dir, files)
# Sort to get more reproducible tests
files.sort()
return files

TestCase = unittest.TestCase

[8]ページ先頭

©2009-2025 Movatter.jp