Skip to content

Commit

Permalink
Fix nox configuration for PyPy
Browse files Browse the repository at this point in the history
  • Loading branch information
sbidoul committed Feb 26, 2020
1 parent a3109ac commit 079fd6c
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
nox.options.reuse_existing_virtualenvs = True


@nox.session(python=["2.7", "3.4", "3.5", "3.6", "3.7", "3.8", "pypy", "pypy3"])
@nox.session(python=["2.7", "3.4", "3.5", "3.6", "3.7", "3.8", "pypy", "pypy3"],)
def tests(session):
def coverage(*args):
session.run("python", "-m", "coverage", *args)
Expand All @@ -21,7 +21,17 @@ def coverage(*args):
coverage("report", "-m", "--fail-under", "100")
else:
# Don't do coverage tracking for PyPy, since it's SLOW.
session.run("pytest", "--capture=no", "--strict", *session.posargs)
# Force PYTHONPATH to include the project directory first,
# (which is done automatically by python3 but not PyPY), to
# avoid testing the version of packaging that gets installed
# in site-packages as a dependency of pytest.
session.run(
"pytest",
"--capture=no",
"--strict",
*session.posargs,
env={"PYTHONPATH": "."},
)


@nox.session(python="3.8")
Expand Down

0 comments on commit 079fd6c

Please sign in to comment.