Skip to content

Refactor live tests for speed #213

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

Open
pombredanne opened this issue Apr 2, 2025 · 1 comment
Open

Refactor live tests for speed #213

pombredanne opened this issue Apr 2, 2025 · 1 comment

Comments

@pombredanne
Copy link
Member

=========================================================================== slowest 20 durations ============================================================================
31.38s call     tests/test_api.py::test_api_with_requirement_file
22.70s call     tests/test_resolution.py::test_without_supported_wheels
16.58s call     tests/test_cli.py::test_pdt_output_with_frozen_requirements
13.41s call     tests/test_cli.py::test_pdt_output_with_pinned_requirements
12.69s call     tests/test_resolution.py::test_get_resolved_dependencies_with_flask_and_python_36
8.87s call     tests/test_cli.py::test_cli_with_azure_devops_with_python_313
8.73s call     tests/test_cli.py::test_cli_with_single_index_url_except_pypi_simple
8.09s call     tests/test_resolution.py::test_get_resolved_dependencies_with_flask_and_python_310
7.98s call     tests/test_resolution.py::test_get_resolved_dependencies_with_flask_and_python_310_windows
7.56s call     tests/test_cli.py::test_cli_with_azure_devops_with_python_310
7.29s call     tests/test_cli.py::test_cli_with_azure_devops_with_python_38
6.34s call     tests/test_cli.py::test_cli_with_pinned_requirements_file
3.54s call     tests/test_cli.py::test_cli_with_requirements_and_ignore_errors
2.83s call     tests/test_cli.py::test_cli_with_environment_marker_and_complex_ranges
2.83s call     tests/test_api.py::test_api_with_prefer_source
2.74s call     tests/test_api.py::test_api_with_specifier_pdt
2.73s call     tests/test_api.py::test_api_with_specifier
2.64s call     tests/test_api.py::test_api_with_python_311
2.62s call     tests/test_api.py::test_api_with_recursive_requirement_file
2.28s call     tests/test_resolution.py::test_get_resolved_dependencies_with_tilde_requirement_using_json_api

... we can do better!

@pombredanne
Copy link
Member Author

We could use mocks but this would defeat the purpose of having live tests. The simpler way is to have a few controlled, small packages that we publish and that are used in tests.

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