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

Setting threads and iterations to 1 results in tests running twice, once on main thread and once on ThreadPoolExecutor-0_0 #20

Open
dan-glass opened this issue Nov 14, 2024 · 0 comments

Comments

@dan-glass
Copy link

pytest --threads 1 --iterations 1

Output:

2024-11-14 04:39:40.249 WARNING MainThread  pytest_freethreaded.plugin.pytest_sessionstart      GIL is enabled, so tests will not be run truly in parallel
================================================================================================================================================================= test session starts ==================================================================================================================================================================
platform linux -- Python 3.13.0, pytest-8.3.3, pluggy-1.5.0 -- /usr/bin/python3
cachedir: .pytest_cache
rootdir: /transport
configfile: pytest.ini
plugins: freethreaded-0.1.0, timeout-2.3.1, env-1.1.5, cov-2.8.1
timeout: 30.0s
timeout method: signal
timeout func_only: False
collected 1 item

test_me.py::test_me
-------------------------------------------------------------------------------------------------------------------------------------------------------------------- live log setup --------------------------------------------------------------------------------------------------------------------------------------------------------------------
...
-------------------------------------------------------------------------------------------------------------------------------------------------------------------- live log call ---------------------------------------------------------------------------------------------------------------------------------------------------------------------
2024-11-14 04:39:40.682 DEBUG MainThread  pytest_freethreaded.plugin.pytest_runtest_call        Running test test_me
2024-11-14 04:39:40.686 DEBUG ThreadPoolExecutor-0_0  test_me        test_me
2024-11-14 04:39:40.688 DEBUG MainThread  test_me    test_me
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant