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

Mark test_gen_exports's test_process as run_slow #3206

Closed
A5rocks opened this issue Feb 11, 2025 · 1 comment · Fixed by #3215
Closed

Mark test_gen_exports's test_process as run_slow #3206

A5rocks opened this issue Feb 11, 2025 · 1 comment · Fixed by #3215

Comments

@A5rocks
Copy link
Contributor

A5rocks commented Feb 11, 2025

Locally each parametrize of this takes 2 seconds. Given there's 3 of them, that's more than 20% of the runtime of pytest locally!

For reference:

================================================ slowest 10 durations =================================================
2.19s call     src/trio/_tests/tools/test_gen_exports.py::test_process[from collections import Counter\n]
2.13s call     src/trio/_tests/tools/test_gen_exports.py::test_process[from collections import Counter\nimport os\n]
2.04s call     src/trio/_tests/test_highlevel_open_tcp_listeners.py::test_open_tcp_listeners_ipv6_v6only
2.03s call     src/trio/_tests/test_socket.py::test_address_in_socket_error
2.02s call     src/trio/_tests/test_socket.py::test_SocketType_connect_paths
2.00s call     src/trio/_tests/tools/test_gen_exports.py::test_process[from typing import TYPE_CHECKING\nif TYPE_CHECKING:\n    from collections import Counter\n]
1.52s call     src/trio/_tests/test_socket.py::test_many_sockets
0.70s call     src/trio/_tests/test_exports.py::test_static_tool_sees_all_symbols[jedi-trio]
0.56s call     src/trio/_tests/tools/test_gen_exports.py::test_lint_failure
0.51s call     src/trio/_tests/test_util.py::test_coroutine_or_error
===================================== 769 passed, 77 skipped, 2 xfailed in 28.59s =====================================
@A5rocks
Copy link
Contributor Author

A5rocks commented Feb 11, 2025

More generally anything above the 1 second mark is kind of suspect. Many of the network tests simply don't need that many runs too -- for instance test_many_sockets is 10x what it could be. (based on comments in the test case)

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

Successfully merging a pull request may close this issue.

1 participant