Skip to content

Commit

Permalink
Disable coverage for now
Browse files Browse the repository at this point in the history
  • Loading branch information
Erotemic committed Sep 24, 2024
1 parent 7aa5db8 commit f7c7e39
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,17 +141,26 @@ def main():
else:
print(f'[run_tests] No installed version of {package_name} found')

# disable coverage in cibuildwheel for now
use_coverage = not is_cibuildwheel()

try:
import pytest
pytest_args = [
'--cov-config', os.fspath(pyproject_fpath),
'--cov-report', 'html',
'--cov-report', 'term',
'--cov-report', 'xml',
'--cov=' + package_name,
pytest_args = []

if use_coverage:
pytest_args += [
'--cov-config', os.fspath(pyproject_fpath),
'--cov-report', 'html',
'--cov-report', 'term',
'--cov-report', 'xml',
'--cov=' + package_name,
]

pytest_args += [
os.fspath(modpath), os.fspath(test_dir)
]
if is_cibuildwheel():
if is_cibuildwheel() and use_coverage:
pytest_args.append('--cov-append')

pytest_args = pytest_args + sys.argv[1:]
Expand All @@ -163,7 +172,7 @@ def main():
retcode = 1
finally:
os.chdir(orig_cwd)
if is_cibuildwheel():
if is_cibuildwheel() and use_coverage:
# for CIBW under linux
copy_coverage_cibuildwheel_docker(f'/home/runner/work/{package_name}/{package_name}')
print('[run_tests] Restoring cwd = {!r}'.format(orig_cwd))
Expand Down

0 comments on commit f7c7e39

Please sign in to comment.