File tree Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,24 @@ def pytest_addoption(parser):
19
19
]
20
20
21
21
22
+ def pytest_configure (config ):
23
+ disable_coverage_on_pypy (config )
24
+
25
+
26
+ def disable_coverage_on_pypy (config ):
27
+ """
28
+ Coverage makes tests on PyPy unbearably slow, so disable it.
29
+ """
30
+ if '__pypy__' not in sys .builtin_module_names :
31
+ return
32
+
33
+ # Recommended at pytest-dev/pytest-cov#418
34
+ cov = config .pluginmanager .get_plugin ('_cov' )
35
+ cov .options .no_cov = True
36
+ if cov .cov_controller :
37
+ cov .cov_controller .pause ()
38
+
39
+
22
40
if sys .version_info < (3 ,):
23
41
collect_ignore .append ('setuptools/lib2to3_ex.py' )
24
42
collect_ignore .append ('setuptools/_imp.py' )
Original file line number Diff line number Diff line change @@ -27,10 +27,6 @@ extras =
27
27
tests
28
28
29
29
30
- [testenv:pypy{,3}]
31
- commands = pytest --no-cov {posargs}
32
-
33
-
34
30
[testenv:coverage]
35
31
description =Combine coverage data and create report
36
32
deps =coverage
You can’t perform that action at this time.
0 commit comments