Skip to content

Commit

Permalink
Disable coverage on PyPy
Browse files Browse the repository at this point in the history
  • Loading branch information
Stranger6667 committed Mar 5, 2021
1 parent a4d7bb1 commit cb7a1f2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ jobs:
- name: Install dependencies
run: python -m pip install --upgrade pip setuptools tox
- name: Run tests
run: python -m tox --recreate -e test
# Disable coverage on PyPy
run: python -m tox --recreate -e test $(${{ startsWith(matrix.python-version, 'pypy') }} && echo '-- -n auto --no-cov')

release:
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions src/hypothesis_jsonschema/_encode.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
PYTHON_IMPLEMENTATION = platform.python_implementation()
JSONType = Union[None, bool, float, str, list, Dict[str, Any]]

if PYTHON_IMPLEMENTATION != "PyPy":
if PYTHON_IMPLEMENTATION != "PyPy": # pragma: no cover
from json.encoder import _make_iterencode, encode_basestring_ascii # type: ignore
else:
_make_iterencode = None
Expand All @@ -27,7 +27,7 @@ def _floatstr(o: float) -> str:

class CanonicalisingJsonEncoder(json.JSONEncoder):

if PYTHON_IMPLEMENTATION == "PyPy":
if PYTHON_IMPLEMENTATION == "PyPy": # pragma: no cover

def _JSONEncoder__floatstr(self, o: float) -> str: # noqa: N802
return _floatstr(o)
Expand Down

0 comments on commit cb7a1f2

Please sign in to comment.