Skip to content

gh-109402: Fix regrtest findtests() - #109403

Merged
vstinner merged 1 commit into
python:mainfrom
vstinner:regrtest_findtests
Sep 14, 2023
Merged

gh-109402: Fix regrtest findtests()#109403
vstinner merged 1 commit into
python:mainfrom
vstinner:regrtest_findtests

Conversation

@vstinner

@vstinnervstinner commented Sep 14, 2023

Copy link
Copy Markdown
Member

Check for the full module name in SPLITTESTDIRS, not the relative module name.

Check for the full module name in SPLITTESTDIRS, not the relative
module name.
@vstinner

Copy link
Copy Markdown
MemberAuthor

@sobolevn: Can you please check if this change fix your issue?

@sobolevn

Copy link
Copy Markdown
Member

Oh, sorry, I've missed this PR and opened another one: #109404

@vstinner

Copy link
Copy Markdown
MemberAuthor

Does this change fix your issue?

@sobolevn

Copy link
Copy Markdown
Member

Steps to test this:

  1. Checkout gh-108303: Move test_future into its own subdir #109368
  2. Rename Lib/test/test_future_stmt/test_future.py to Lib/test/test_future_stmt/test_future_stmt.py to reproduce the problem
  3. Make sure that tests fail
  4. Copy the proposed solution
  5. Make sure that they pass
» ./python.exe -m test test_future_stmt
0:00:00 load avg: 1.91 Run 5 tests sequentially
0:00:00 load avg: 1.91 [1/5] test_future_stmt.test___future__
0:00:00 load avg: 1.91 [2/5] test_future_stmt.test_future3
0:00:00 load avg: 1.91 [3/5] test_future_stmt.test_future4
0:00:00 load avg: 1.91 [4/5] test_future_stmt.test_future5
0:00:00 load avg: 1.91 [5/5] test_future_stmt.test_future_stmt
== Tests result: SUCCESS ==
All 5 tests OK.
Total duration: 173 ms
Total tests: run=32
Total test files: run=5/5
Result: SUCCESS

It works for me! Thanks!

@vstinner

Copy link
Copy Markdown
MemberAuthor
0:00:00 load avg: 1.91 [2/5] test_future_stmt.test_future3
0:00:00 load avg: 1.91 [3/5] test_future_stmt.test_future4
0:00:00 load avg: 1.91 [4/5] test_future_stmt.test_future5
0:00:00 load avg: 1.91 [5/5] test_future_stmt.test_future_stmt

These test names are not helpful. Would it be possible to come with better names while we are moving code/renaming files anyway?

@vstinner

Copy link
Copy Markdown
MemberAuthor
0:00:00 load avg: 1.91 [1/5] test_future_stmt.test___future__
0:00:00 load avg: 1.91 [5/5] test_future_stmt.test_future_stmt

Just from the name, it's not clear which test is testing the future statement... Both? Maybe propose a better name?

@vstinner

Copy link
Copy Markdown
MemberAuthor

Ignore my comments here, there were for PR #109368 :-)

@vstinner

Copy link
Copy Markdown
MemberAuthor

It works for me! Thanks!

Good. I prefer to avoid isdir() if possible.

@vstinner
vstinner enabled auto-merge (squash) September 14, 2023 13:06
@vstinner
vstinner merged commit 9ccd2e6 into python:mainSep 14, 2023
@vstinner
vstinner deleted the regrtest_findtests branch September 14, 2023 13:15
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@vstinner@sobolevn