summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/coverage.yml4
-rw-r--r--igor.py3
-rw-r--r--tests/test_process.py2
3 files changed, 4 insertions, 5 deletions
diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
index c305477b..e7dd828f 100644
--- a/.github/workflows/coverage.yml
+++ b/.github/workflows/coverage.yml
@@ -73,9 +73,7 @@ jobs:
COVERAGE_CONTEXT: "${{ matrix.python-version }}.${{ matrix.os }}"
run: |
set -xe
- # Something about pytest 6.x with xdist keeps data from collecting.
- # Use -n0 for now.
- python -m tox -- -n 0
+ python -m tox
- name: "Upload coverage data"
uses: actions/upload-artifact@v2
diff --git a/igor.py b/igor.py
index 0ea93e40..58774036 100644
--- a/igor.py
+++ b/igor.py
@@ -15,6 +15,7 @@ import inspect
import os
import platform
import sys
+import sysconfig
import textwrap
import warnings
import zipfile
@@ -143,7 +144,7 @@ def run_tests_with_coverage(tracer, *runner_args):
# The .pth file seems to have to be alphabetically after easy-install.pth
# or the sys.path entries aren't created right?
# There's an entry in "make clean" to get rid of this file.
- pth_dir = os.path.dirname(pytest.__file__)
+ pth_dir = sysconfig.get_path("purelib")
pth_path = os.path.join(pth_dir, "zzz_metacov.pth")
with open(pth_path, "w") as pth_file:
pth_file.write("import coverage; coverage.process_startup()\n")
diff --git a/tests/test_process.py b/tests/test_process.py
index 5510efe5..af2d3e78 100644
--- a/tests/test_process.py
+++ b/tests/test_process.py
@@ -1411,7 +1411,7 @@ def possible_pth_dirs():
# If we're still looking, then try the Python library directory.
# https://github.com/nedbat/coveragepy/issues/339
- yield sysconfig.get_python_lib() # pragma: cant happen
+ yield sysconfig.get_path("purelib") # pragma: cant happen
def find_writable_pth_directory():