diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 7191b5fd..9c29cc2f 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -35,6 +35,7 @@ jobs: - '3.10' - '3.11' - '3.12' + - '3.13' - 'pypy-3.9' - 'pypy-3.10' toxenv: [py] diff --git a/setup.cfg b/setup.cfg index d5a3a1a6..318ddd8c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -30,6 +30,7 @@ classifiers = Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 Programming Language :: Python :: 3.12 + Programming Language :: Python :: 3.13 Programming Language :: Python :: Implementation :: CPython Programming Language :: Python :: Implementation :: PyPy License :: OSI Approved :: MIT License diff --git a/test/test_execution.py b/test/test_execution.py index 871a7d15..2042cdfc 100644 --- a/test/test_execution.py +++ b/test/test_execution.py @@ -213,11 +213,22 @@ def runner() -> int: thread = threading.Thread(target=runner) thread.start() - sleep(0.3) # make sure the process is started - ps_command = "ps aux | grep '[s]leep 60.74016230000801'" # brackets to not match grep process - ps_output = subprocess.check_output(ps_command, shell=True).decode() - pid = int(ps_output.split()[1]) - os.kill(pid, signal.SIGTERM) + retries = 20 + pid = None + for i in range(retries): + try: + ps_command = "ps auxww | grep '[s]leep 60.74016230000801'" # brackets to not match grep process + ps_output = subprocess.check_output(ps_command, shell=True).decode() + pid = int(ps_output.split()[1]) + break + except subprocess.CalledProcessError as e: + print(f"Attempt {i} failed with msg: {e}", file=sys.stderr) + sleep(0.1) # Retry after a short delay + + if pid is not None: + os.kill(pid, signal.SIGTERM) + else: + raise RuntimeError("Failed to find sleep process") thread.join() # Cannot retrieve the exit code from the thread, it is written to the file diff --git a/tox.ini b/tox.ini index c5e67e31..4868b96c 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = lint,typing,py38,py39,py310,py311,py312,pypy3 +envlist = lint,typing,py39,py310,py311,py312,py313,pypy3 skip_missing_interpreters = True isolated_build = True minversion = 3.3.0