diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c2e9752..78d6dcf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/src/hypothesis_jsonschema/_encode.py b/src/hypothesis_jsonschema/_encode.py index 8f1a423..2ef0608 100644 --- a/src/hypothesis_jsonschema/_encode.py +++ b/src/hypothesis_jsonschema/_encode.py @@ -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 @@ -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)