Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
9f47efe7
Commit
9f47efe7
authored
Jul 03, 2020
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Programmatically disable coverage when running on PyPy.
parent
c897b90c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
4 deletions
+18
-4
conftest.py
conftest.py
+18
-0
tox.ini
tox.ini
+0
-4
No files found.
conftest.py
View file @
9f47efe7
...
...
@@ -17,6 +17,24 @@ collect_ignore = [
]
def
pytest_configure
(
config
):
disable_coverage_on_pypy
(
config
)
def
disable_coverage_on_pypy
(
config
):
"""
Coverage makes tests on PyPy unbearably slow, so disable it.
"""
if
'__pypy__'
not
in
sys
.
builtin_module_names
:
return
# Recommended at pytest-dev/pytest-cov#418
cov
=
config
.
pluginmanager
.
get_plugin
(
'_cov'
)
cov
.
options
.
no_cov
=
True
if
cov
.
cov_controller
:
cov
.
cov_controller
.
pause
()
if
sys
.
version_info
<
(
3
,):
collect_ignore
.
append
(
'setuptools/lib2to3_ex.py'
)
collect_ignore
.
append
(
'setuptools/_imp.py'
)
...
...
tox.ini
View file @
9f47efe7
...
...
@@ -29,10 +29,6 @@ extras =
tests
[testenv:pypy{,3}]
commands
=
pytest --no-cov {posargs}
[testenv:coverage]
description
=
Combine coverage data and create report
deps
=
coverage
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment