Skip to content

Conversation

@vstinner
Copy link
Member

@vstinnervstinner 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
MemberAuthor

@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
MemberAuthor

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
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
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
MemberAuthor

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

@vstinner
Copy link
MemberAuthor

It works for me! Thanks!

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

@vstinnervstinner enabled auto-merge (squash) September 14, 2023 13:06
@vstinnervstinner merged commit 9ccd2e6 into python:mainSep 14, 2023
@vstinnervstinner 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