Skip to content

Commit

Permalink
Skip a test on 3.13+manylinux.
Browse files Browse the repository at this point in the history
Appears to hang. It was a refcounting test so those can be flaky and version dependent anyway.
  • Loading branch information
jamadden committed Sep 9, 2024
1 parent 3d2bf82 commit 00431e2
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 14 deletions.
2 changes: 2 additions & 0 deletions make-manylinux
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ if [ -d /greenlet -a -d /opt/python ]; then
mkdir -p /greenlet/wheelhouse
OPATH="$PATH"
which auditwheel
echo "Installed Python versions"
ls -l /opt/python
for variant in `ls -d /opt/python/cp{313,37,38,39,310,311,312}*`; do
export PATH="$variant/bin:$OPATH"
echo "Building $variant $(python --version)"
Expand Down
12 changes: 8 additions & 4 deletions src/greenlet/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
Tests for greenlet.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

import os
import sys
import unittest

Expand All @@ -27,7 +24,14 @@
from . import leakcheck

PY312 = sys.version_info[:2] >= (3, 12)
PY313 = sys.version_info[:2] >= (3, 13)

WIN = sys.platform.startswith("win")
RUNNING_ON_GITHUB_ACTIONS = os.environ.get('GITHUB_ACTIONS')
RUNNING_ON_TRAVIS = os.environ.get('TRAVIS') or RUNNING_ON_GITHUB_ACTIONS
RUNNING_ON_APPVEYOR = os.environ.get('APPVEYOR')
RUNNING_ON_CI = RUNNING_ON_TRAVIS or RUNNING_ON_APPVEYOR
RUNNING_ON_MANYLINUX = os.environ.get('GREENLET_MANYLINUX')

class TestCaseMetaClass(type):
# wrap each test method with
Expand Down
23 changes: 13 additions & 10 deletions src/greenlet/tests/test_greenlet.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

import gc
import sys
import time
import threading
import unittest

from abc import ABCMeta, abstractmethod
from abc import ABCMeta
from abc import abstractmethod

import greenlet
from greenlet import greenlet as RawGreenlet
from . import TestCase
from . import RUNNING_ON_MANYLINUX
from . import PY313
from .leakcheck import fails_leakcheck


Expand Down Expand Up @@ -207,10 +207,7 @@ def run():
# we don't get the exception, it just gets printed.
# When we run on 3.8 only, we can use sys.unraisablehook
oldstderr = sys.stderr
try:
from cStringIO import StringIO
except ImportError:
from io import StringIO
from io import StringIO
stderr = sys.stderr = StringIO()
try:
del g
Expand Down Expand Up @@ -716,6 +713,13 @@ def greenlet_main():
del self.glets
self.assertEqual(sys.getrefcount(Greenlet), initial_refs)

@unittest.skipIf(
PY313 and RUNNING_ON_MANYLINUX,
"The manylinux images appear to hang on this test on 3.13rc2"
# Or perhaps I just got tired of waiting for the 450s timeout.
# Still, it shouldn't take anywhere near that long. Does not reproduce in
# Ubuntu images, on macOS or Windows.
)
def test_issue_245_reference_counting_subclass_threads(self):
# https://github.com/python-greenlet/greenlet/issues/245
from threading import Thread
Expand Down Expand Up @@ -1309,5 +1313,4 @@ def test_reentrant_switch_run_callable_has_del(self):
)

if __name__ == '__main__':
import unittest
unittest.main()

0 comments on commit 00431e2

Please sign in to comment.