Skip to content

Commit

Permalink
Enable PyPy testing (#530)
Browse files Browse the repository at this point in the history
* Skip failing tests on PyPy for now

* use move pypy3.9 into main tests

* never mind pypy is experimental then

* skip meticulous tests on pypy

* no cython w/pypy for now

* skip janky tests on pypy

* lint

* rename workflow

* add asyncio_mode = "auto" to pyproject.toml

* undo disabled tests in functional test_streams.py

* enable regular stream testing for unit tests
  • Loading branch information
wbarnha authored Jun 29, 2023
1 parent 600d0ae commit 7eea54a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: Test Python library
name: CI/CD
on:
push:
branches: [master]
Expand Down Expand Up @@ -48,13 +48,13 @@ jobs:
python-version: ['3.8', '3.9', '3.10', '3.11']
use-cython: ['true', 'false']
experimental: [false]
# include:
# - python-version: pypy3.9
# experimental: true
# use-cython: 'false'
# - python-version: ~3.12.0-0
# experimental: true
# use-cython: 'false'
include:
- python-version: 'pypy3.9'
use-cython: false
experimental: true
# - python-version: ~3.12.0-0
# experimental: true
# use-cython: 'false'
env:
USE_CYTHON: ${{ matrix.use-cython }}
continue-on-error: ${{ matrix.experimental }}
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ ignore_missing_imports = true
disallow_untyped_defs = true

[tool.pytest.ini_options]
asyncio_mode = "auto"
minversion = "6.0"
addopts = [
"--cov-report=term-missing:skip-covered",
Expand Down
11 changes: 11 additions & 0 deletions tests/meticulous/assignor/test_copartitioned_assignor.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import copy
import platform
from collections import Counter
from typing import MutableMapping

import pytest
from hypothesis import assume, given, settings
from hypothesis.strategies import integers

Expand Down Expand Up @@ -77,6 +79,9 @@ def client_removal_sticky(
return True


@pytest.mark.skipif(
platform.python_implementation() == "PyPy", reason="Not yet supported on PyPy"
)
@given(
partitions=integers(min_value=0, max_value=256),
replicas=integers(min_value=0, max_value=64),
Expand All @@ -95,6 +100,9 @@ def test_fresh_assignment(partitions, replicas, num_clients):
assert is_valid(new_assignments, partitions, replicas)


@pytest.mark.skipif(
platform.python_implementation() == "PyPy", reason="Not yet supported on PyPy"
)
@given(
partitions=integers(min_value=0, max_value=256),
replicas=integers(min_value=0, max_value=64),
Expand Down Expand Up @@ -131,6 +139,9 @@ def test_add_new_clients(partitions, replicas, num_clients, num_additional_clien
assert clients_balanced(new_assignments)


@pytest.mark.skipif(
platform.python_implementation() == "PyPy", reason="Not yet supported on PyPy"
)
@given(
partitions=integers(min_value=0, max_value=256),
replicas=integers(min_value=0, max_value=64),
Expand Down

0 comments on commit 7eea54a

Please sign in to comment.