Files
python314/skipped_tests.py
Matej Cepl ce17a8111c - Update to 3.14.0~rc1:
- Tools/Demos
    - gh-136251: Fixes and usability improvements for
      Tools/wasm/emscripten/web_example
  - Security
    - gh-135661: Fix parsing attributes with whitespaces around
      the = separator in html.parser.HTMLParser according to the
      HTML5 standard.
    - gh-118350: Fix support of escapable raw text mode (elements
      “textarea” and “title”) in html.parser.HTMLParser.
  - Library
    - gh-136170: Removed the unreleased
      zipfile.ZipFile.data_offset property added in 3.14.0a7 as
      it wasn’t fully clear which behavior it should have in some
      situations so the result was not always what a user might
      expect.
    - gh-124621: pyrepl now works in Emscripten.
    - gh-136874: Discard URL query and fragment in
      urllib.request.url2pathname().
    - gh-130645: Enable color help by default in argparse.
    - gh-136549: Fix signature of threading.excepthook().
    - gh-136523: Fix wave.Wave_write emitting an unraisable when
      open raises.
    - gh-52876: Add missing keepends (default True)
      parameter to codecs.StreamReaderWriter.readline() and
      codecs.StreamReaderWriter.readlines().
    - gh-136470: Correct
      concurrent.futures.InterpreterPoolExecutor’s default thread
      name.
    - gh-136476: Fix a bug that was causing the

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python314?expand=0&rev=86
2025-07-23 08:11:40 +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)