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

Skip tests failing on Python 3.12 pending greenlet support #264

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 6 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ name: test

on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
# Midnight UTC:
- cron: "0 0 * * *"
workflow_dispatch:

jobs:

Expand All @@ -19,28 +18,22 @@ jobs:
matrix:
# Test all supported versions on Ubuntu:
os: [ubuntu-latest]
python: ["3.7", "3.8", "3.9", "3.10", 3.11-dev, 3.12-dev]
python: [pypy3.8, pypy3.9, "3.7", "3.8", "3.9", "3.10", 3.11-dev, 3.12-dev]
include:
# Also test PyPy, macOS, and Windows:
- os: ubuntu-latest
python: pypy-3.9
- os: ubuntu-latest
python: pypy-3.8
- os: ubuntu-latest
python: pypy-3.7
# Also test macOS and Windows:
- os: macos-latest
python: "3.10"
- os: windows-latest
python: "3.10"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
if: "!endsWith(matrix.python, '-dev')"
with:
python-version: ${{ matrix.python }}
- name: Set up Python ${{ matrix.python }} using deadsnakes
uses: deadsnakes/action@v2.1.1
uses: deadsnakes/action@v3.0.0
if: "endsWith(matrix.python, '-dev')"
with:
python-version: ${{ matrix.python }}
Expand Down
9 changes: 9 additions & 0 deletions pyperformance/tests/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@
import pyperformance
from pyperformance import tests

# Skip tests failing on Python 3.12
# pending https://github.com/python-greenlet/greenlet/issues/323
try:
import greenlet
except ImportError:
greenlet = None


class FullStackTests(tests.Functional, unittest.TestCase):

Expand Down Expand Up @@ -92,6 +99,7 @@ def test_list_groups(self):
###################################
# venv

@unittest.skipUnless(greenlet, "requires greenlet")
def test_venv(self):
# XXX Capture and check the output.
root = self.resolve_tmp('venv', unique=True)
Expand Down Expand Up @@ -140,6 +148,7 @@ def expect_failure(*args):
###################################
# run

@unittest.skipUnless(greenlet, "requires greenlet")
def test_run_and_show(self):
filename = self.resolve_tmp('bench.json')

Expand Down