GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-109402: Fix regrtest findtests() by vstinner · Pull Request #109403 · python/cpython

Conversation

@vstinner

@vstinner vstinner commented Sep 14, 2023 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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

  • Issue: Bug in regrtest when name in SPLITTESTDIRS also matches a module name in tests #109402

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@vstinner
pythongh-109402: Fix libregrtest findtests()
ece2406
Check for the full module name in SPLITTESTDIRS, not the relative
module name.
@bedevere-app bedevere-app Bot added the awaiting review label Sep 14, 2023
@bedevere-app bedevere-app Bot mentioned this pull request Sep 14, 2023
Bug in regrtest when name in SPLITTESTDIRS also matches a module name in tests #109402
Closed
@vstinner

vstinner commented Sep 14, 2023

Copy link
Copy Markdown
Member Author

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner vstinner added the skip news label Sep 14, 2023
@sobolevn

sobolevn commented Sep 14, 2023

Copy link
Copy Markdown
Member

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner

vstinner commented Sep 14, 2023

Copy link
Copy Markdown
Member Author

Does this change fix your issue?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sobolevn

sobolevn commented Sep 14, 2023

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!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner

vstinner commented Sep 14, 2023

Copy link
Copy Markdown
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?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner

vstinner commented Sep 14, 2023

Copy link
Copy Markdown
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?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner

vstinner commented Sep 14, 2023

Copy link
Copy Markdown
Member Author

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner

vstinner commented Sep 14, 2023

Copy link
Copy Markdown
Member Author

It works for me! Thanks!

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner
vstinner enabled auto-merge (squash) September 14, 2023 13:06
@vstinner
vstinner merged commit 9ccd2e6 into python:main Sep 14, 2023
@vstinner
vstinner deleted the regrtest_findtests branch September 14, 2023 13:15
@bedevere-app bedevere-app Bot removed the awaiting review label Sep 14, 2023
@sobolevn sobolevn mentioned this pull request Oct 11, 2023
[3.12] gh-108303: Move all inspect test files to test_inspect/ (GH-109607) #110732
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@vstinner @sobolevn
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.