From 76039a229dd349076b395a754667fb85919d9769 Mon Sep 17 00:00:00 2001 From: rocky Date: Sat, 24 Feb 2024 12:11:54 -0500 Subject: [PATCH] Go over 2.6 excludes --- test/stdlib/2.6-exclude.sh | 28 ++++++++++++++-------------- test/stdlib/runtests.sh | 17 +++++++++++++---- 2 files changed, 27 insertions(+), 18 deletions(-) diff --git a/test/stdlib/2.6-exclude.sh b/test/stdlib/2.6-exclude.sh index 657c6cf9..5b395032 100644 --- a/test/stdlib/2.6-exclude.sh +++ b/test/stdlib/2.6-exclude.sh @@ -8,23 +8,22 @@ SKIP_TESTS=( # [test_shutil.py]=1 # OK but needs PYTHON=pytest [test___all__.py]=1 # it fails on its own - [test_aepack.py]=1 # it fails on its own - [test_al.py]=1 # it fails on its own - [test_anydbm.py]=1 # it fails on its own - [test_applesingle.py]=1 # it fails on its own - + [test_aepack.py]=1 # No module macostools + [test_al.py]=1 # No module macostools + [test_anydbm.py]=pytest + [test_applesingle.py]=1 # No module macostools [test_bsddb185.py]=1 # it fails on its own [test_bsddb3.py]=1 # it fails on its own - [test_bsddb.py]=1 # it fails on its own + [test_bsddb.py]=1 # No module _bsdb - # [test_cd.py]=1 # it fails on its own + [test_cd.py]=1 # i# No module cl [test_cl.py]=1 # it fails on its own [test_codecmaps_cn.py]=1 # it fails on its own [test_codecmaps_jp.py]=1 # it fails on its own [test_codecmaps_kr.py]=1 # it fails on its own [test_codecmaps_tw.py]=1 # it fails on its own [test_commands.py]=1 # it fails on its own - [test_curses.py]=1 # it fails on its own + [test_curses.py]=1 # needs libncurses.so.5 [test_dbm.py]=1 # it fails on its own [test_descr.py]=1 @@ -33,16 +32,16 @@ SKIP_TESTS=( [test_dl.py]=1 # it fails on its own [test_file.py]=1 # it fails on its own - [test_future5.py]=1 # it fails on its own + [test_future5.py]=pytest - # [test_generators.py]=1 # works but use PYTHON=pytest + [test_generators.py]=pytest [test_gl.py]=1 # it fails on its own - # [test_grp.py]=1 # works but use PYTHON=pytest + [test_grp.py]=pytest [test_imageop.py]=1 # it fails on its own [test_imaplib.py]=1 # it fails on its own [test_imgfile.py]=1 # it fails on its own - # [test_ioctl.py]=1 # works but use PYTHON=pytest + [test_ioctl.py]=pytest [test_kqueue.py]=1 # it fails on its own @@ -63,6 +62,7 @@ SKIP_TESTS=( [test_scriptpackages.py]=1 # it fails on its own [test_select.py]=1 # test takes too long to run: 11 seconds + [test_signal.py]=1 # takes more than 15 seconds to run [test_socket.py]=1 # test takes too long to run: 12 seconds [test_startfile.py]=1 # it fails on its own [test_structmembers.py]=1 # it fails on its own @@ -81,8 +81,8 @@ SKIP_TESTS=( [test_winreg.py]=1 # it fails on its own [test_winsound.py]=1 # it fails on its own - [test_zipimport_support.py]=1 # expected test to raise ImportError - [test_zipfile64.py]=1 # Skip Long test + [test_zipimport_support.py]=pytest # expected test to raise ImportError + [test_zipfile.py]=pytest # Skip Long test # .pyenv/versions/2.6.9/lib/python2.6/lib2to3/refactor.pyc # .pyenv/versions/2.6.9/lib/python2.6/pyclbr.pyc ) diff --git a/test/stdlib/runtests.sh b/test/stdlib/runtests.sh index b0c74644..1fa964ef 100755 --- a/test/stdlib/runtests.sh +++ b/test/stdlib/runtests.sh @@ -187,7 +187,11 @@ if [[ -n $1 ]] ; then files=$@ typeset -a files_ary=( $(echo $@) ) if (( ${#files_ary[@]} == 1 || DONT_SKIP_TESTS == 1 )) ; then - SKIP_TESTS=() + for file in $files; do + if (( SKIP_TESTS[$file] != "pytest" )); then + SKIP_TESTS[$file] = 1; + fi + done fi else files=$(echo test_*.py) @@ -201,9 +205,14 @@ NOT_INVERTED_TESTS=${NOT_INVERTED_TESTS:-1} for file in $files; do # AIX bash doesn't grok [[ -v SKIP... ]] [[ -z ${SKIP_TESTS[$file]} ]] && SKIP_TESTS[$file]=0 - if [[ ${SKIP_TESTS[$file]} == ${NOT_INVERTED_TESTS} ]] ; then - ((skipped++)) - continue + + if [[ ${SKIP_TESTS[$file]} == "pytest" ]]; then + PYTHON=pytest + else + if [[ ${SKIP_TESTS[$file]}s == ${NOT_INVERTED_TESTS} ]] ; then + ((skipped++)) + continue + fi fi # If the fails *before* decompiling, skip it!