You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you suspect a test (or the suite as a whole) is running too slowly, `pytest` already exposes everything you need to investigate it. A few invocations that are useful when looking into test runtimes:
113
+
114
+
```bash
115
+
# Show the 20 slowest tests (use 0 to list every test's duration)
116
+
pytest tests --durations=20
117
+
118
+
# Fail any test that exceeds the given timeout (requires pytest-timeout)
119
+
pytest tests --timeout=600
120
+
121
+
# Investigate only fixture/setup costs without actually running the tests
# Skip the slow live-server tests while profiling locally
128
+
pytest tests --durations=0 -m "not production_server and not test_server"
129
+
130
+
# Run the suite in parallel to reproduce CI behaviour (requires pytest-xdist)
131
+
pytest tests -n 4 --dist=load --durations=0
132
+
```
133
+
134
+
Combining these with the marker filters (`production_server`, `test_server`, `sklearn`) makes it straightforward to narrow the investigation down to the slow tests without changing project configuration.
135
+
110
136
### Pull Request Checklist
111
137
112
138
You can go to the `openml-python` GitHub repository to create the pull request by [comparing the branch](https://github.com/openml/openml-python/compare) from your fork with the `main` branch of the `openml-python` repository. When creating a pull request, make sure to follow the comments and structured provided by the template on GitHub.
@@ -214,4 +240,4 @@ When dependencies are installed, run
0 commit comments