python314/skipped_tests.py
Matej Cepl b7a4629611 - Update to the fourth development version of 3.14.0:
- Tools/Demos
    - gh-128152: Fix a bug where Argument Clinic’s C
      pre-processor parser tried to parse pre-processor
      directives inside C comments. Patch by Erlend Aasland.
  - Tests
    - gh-128690: Temporarily do not use test_embed in PGO profile
      builds until the problem with test_init_pyvenv_cfg failing
      in some configurations is resolved.
  - Library
    - gh-128731: Fix ResourceWarning in
      urllib.robotparser.RobotFileParser.read().
    - gh-71339: Add new assertion methods for unittest:
      assertHasAttr(), assertNotHasAttr(), assertIsSubclass(),
      assertNotIsSubclass() assertStartsWith(),
      assertNotStartsWith(), assertEndsWith() and
      assertNotEndsWith().
    - gh-118761: Improve import time of pickle by 25% by removing
      an unnecessary regular expression. As such, re is no more
      implicitly available as pickle.re. Patch by Bénédikt Tran.
    - gh-128661: Fixes typing.evaluate_forward_ref() not showing
      deprecation when type_params arg is not passed.
    - gh-128562: Fix possible conflicts in generated tkinter
      widget names if the widget class name ends with a digit.
    - gh-128559: Improved import time of asyncio.
    - gh-128552: Fix cyclic garbage introduced
      by asyncio.loop.create_task() and
      asyncio.TaskGroup.create_task() holding a reference to the
      created task if it is eager.
    - gh-128340: Add internal thread safe handle to be used

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python314?expand=0&rev=32
2025-01-17 23:07:33 +00:00

70 lines
1.8 KiB
Python

#!/usr/bin/python3
"""
Simple regexp-based skipped test checker.
It lists tests that are mentioned (presumably for exclusion)
in BASE, and in MAIN (presumably for inclusion)
and reports discrepancies.
This will have a number of
"""
MAIN = "python39.spec"
import glob
import re
from os.path import basename
alltests = set()
qemu_exclusions = set()
for item in glob.glob("Python-*/Lib/test/test_*"):
testname = basename(item)
if testname.endswith(".py"):
testname = testname[:-3]
alltests.add(testname)
testre = re.compile(r'[\s"](test_\w+)\b')
def find_tests_in_spec(specname):
global qemu_exclusions
found_tests = set()
with open(specname) as spec:
in_qemu = False
for line in spec:
line = line.strip()
if "#" in line:
line = line[:line.index("#")]
tests = set(testre.findall(line))
found_tests |= tests
if line == "%if 0%{?qemu_user_space_build} > 0":
in_qemu = True
if in_qemu:
if line == "%endif":
in_qemu = False
qemu_exclusions |= tests
return found_tests
excluded = find_tests_in_spec(MAIN)
#print("--- excluded tests:", " ".join(sorted(excluded)))
#print("--- included tests:", " ".join(sorted(included)))
mentioned = excluded
nonexistent = mentioned - alltests
missing = excluded - qemu_exclusions
print("--- the following tests are excluded for QEMU and not tested in python")
print("--- (that probably means we don't need to worry about them)")
for test in sorted(qemu_exclusions - excluded):
print(test)
print("--- the following tests might be excluded in python:")
for test in sorted(missing):
print(test)
if nonexistent:
print("--- the following tests don't exist:")
for test in sorted(nonexistent):
print(test)