Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable PyPy testing #530

Merged
merged 11 commits into from
Jun 29, 2023
Merged
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