Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-109402: Fix regrtest findtests() #109403

Merged
merged 1 commit into from
Sep 14, 2023
Merged

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Sep 14, 2023

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
Member Author

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

@sobolevn
Copy link
Member

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

@vstinner
Copy link
Member Author

Does this change fix your issue?

@sobolevn
Copy link
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
Member Author

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
Member Author

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
Member Author

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

@vstinner
Copy link
Member Author

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:main Sep 14, 2023
18 checks passed
@vstinner vstinner deleted the regrtest_findtests branch September 14, 2023 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants