Skip to content

gh-145334: Make lazy import tests discoverable#145336

Merged
pablogsal merged 8 commits intopython:mainfrom
johnslavik:fix-test-layout-lazy-imports
Feb 28, 2026
Merged

gh-145334: Make lazy import tests discoverable#145336
pablogsal merged 8 commits intopython:mainfrom
johnslavik:fix-test-layout-lazy-imports

Conversation

@johnslavik
Copy link
Member

@johnslavik johnslavik commented Feb 27, 2026

@johnslavik johnslavik changed the title gh-145334: Move test_import.test_lazy_imports to test.test_lazy_import gh-145334: Move test.test_import.test_lazy_imports to test.test_lazy_import Feb 27, 2026
@johnslavik
Copy link
Member Author

johnslavik commented Feb 27, 2026

Conflicts. Sorry, I'll force-push this one time, practicality beats purity.

@johnslavik johnslavik marked this pull request as draft February 27, 2026 23:34
@johnslavik johnslavik force-pushed the fix-test-layout-lazy-imports branch from cb2a385 to 78d584a Compare February 27, 2026 23:38
@johnslavik johnslavik marked this pull request as ready for review February 27, 2026 23:38
@AlexWaygood AlexWaygood removed their request for review February 27, 2026 23:47
@brettcannon brettcannon removed their request for review February 27, 2026 23:47
@johnslavik johnslavik changed the title gh-145334: Move test.test_import.test_lazy_imports to test.test_lazy_import gh-145334: Make lazy import tests discoverable Feb 28, 2026
@pablogsal
Copy link
Member

I have cloned this locally and run a bunch of checks to see that the new files make sense and we are not loosing anything here so I am satisfied. Thanks a lot @johnslavik! Great work 🥇

@pablogsal
Copy link
Member

We should test with an installed python because of the makefile changes. Will do this now

@pablogsal
Copy link
Member

$ ./configure --prefix=$PWD/inst -C
$  make install -j
$ main fix-test-layout-lazy-imports ? ❯ ./inst/bin/python3 -m test test_lazy_import
Using random seed: 2114320666
0:00:00 load avg: 7.47 Run 1 test sequentially in a single process
0:00:00 load avg: 7.47 [1/1] test_lazy_import
BAR_MODULE_LOADED
0:00:00 load avg: 7.47 [1/1] test_lazy_import passed

== Tests result: SUCCESS ==

1 test OK.

Total duration: 655 ms
Total tests: run=91
Total test files: run=1/1
Result: SUCCESS

@pablogsal
Copy link
Member

We are golden

@pablogsal pablogsal merged commit a66d518 into python:main Feb 28, 2026
49 checks passed
bkap123 pushed a commit to bkap123/cpython that referenced this pull request Feb 28, 2026
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