From d3ed646a8ef2e611302ad830205b8693c19c80ec Mon Sep 17 00:00:00 2001 From: rocky Date: Sun, 25 Feb 2024 06:41:25 -0500 Subject: [PATCH] Make a pass over 3.2 stdlib exclusions --- test/stdlib/3.2-exclude.sh | 34 +++++++++++++++++++++++++++------- test/stdlib/runtests.sh | 12 +++++------- 2 files changed, 32 insertions(+), 14 deletions(-) diff --git a/test/stdlib/3.2-exclude.sh b/test/stdlib/3.2-exclude.sh index f80f9ee8..87aec9aa 100644 --- a/test/stdlib/3.2-exclude.sh +++ b/test/stdlib/3.2-exclude.sh @@ -1,7 +1,14 @@ SKIP_TESTS=( - [test_descr.py]=1 # FIXME: Works on c90ff51? + [test_descr.py]=1 + # [test_descr.py]=pytest_module # FIXME: Works on c90ff51? + # AssertionError: 'D(4)C(4)A(4)' != 'D(4)C(4)B(4)A(4)' + # - D(4)C(4)A(4) + # + D(4)C(4)B(4)A(4) + # ? ++++ - [test_cmath.py]=1 # FIXME + + [test_cmath.py]=1 # Control-flow "elif else -> else: if else" + # [test_cmath.py]=pytest_module # AssertionError: rect1000: rect(complex(0.0, 0.0)) # Expected: complex(0.0, 0.0) # Received: complex(0.0, -1.0) @@ -9,14 +16,27 @@ SKIP_TESTS=( [test_cmd_line.py]=1 - [test_collections.py]=1 + + [test_collections.py]=1 # fail on its own + # E TypeError: __new__() takes exactly 4 arguments (1 given) + [test_concurrent_futures.py]=1 # too long to run over 46 seconds by itself - [test_datetimetester.py]=1 - [test_decimal.py]=1 - [test_dictcomps.py]=1 # FIXME: semantic error: actual = {k:v for k in } - [test_doctest.py]=1 # test failures + [test_datetime.py]=pytest_module + + [test_decimal.py]=1 # Fails on its own, even with pytest + + [test_dictcomps.py]=1 + # [test_dictcomps.py]=pytest_module # FIXME: semantic error: actual = {k:v for k in } + # assert (count * 2) <= i + + [test_doctest.py]=1 # Missing pytest fixture + # [test_doctest.py]=pytest_module + # fixture 'coverdir' not found + [test_dis.py]=1 # We change line numbers - duh! + [test_exceptions.py]=1 # parse error + # [test_exceptions.py]=pytest_module # parse error [test_modulefinder.py]=1 # test failures [test_multiprocessing.py]=1 # test takes too long to run: 35 seconds diff --git a/test/stdlib/runtests.sh b/test/stdlib/runtests.sh index 37dd050c..22719c44 100755 --- a/test/stdlib/runtests.sh +++ b/test/stdlib/runtests.sh @@ -168,12 +168,8 @@ if ((IS_PYPY)); then else cp -r ${PYENV_ROOT}/versions/${PYVERSION}.${MINOR}/lib/python${PYVERSION}/test $TESTDIR fi -if [[ $PYVERSION == 3.2 ]] ; then - cp ${PYENV_ROOT}/versions/${PYVERSION}.${MINOR}/lib/python${PYVERSION}/test/* $TESTDIR - cd $TESTDIR -else - cd $TESTDIR/test -fi +cd $TESTDIR/test + pyenv local $FULLVERSION export PYTHONPATH=$TESTDIR export PATH=${PYENV_ROOT}/shims:${PATH} @@ -188,7 +184,7 @@ if [[ -n $1 ]] ; then typeset -a files_ary=( $(echo $@) ) if (( ${#files_ary[@]} == 1 || DONT_SKIP_TESTS == 1 )) ; then for file in $files; do - if (( SKIP_TESTS[$file] != "pytest" )); then + if (( SKIP_TESTS[$file] != "pytest" || SKIP_TESTS[$file] != "pytest_module" )); then SKIP_TESTS[$file]=1; fi done @@ -208,6 +204,8 @@ for file in $files; do if [[ ${SKIP_TESTS[$file]} == "pytest" ]]; then PYTHON=pytest + elif [[ ${SKIP_TESTS[$file]} == "pytest_module" ]]; then + PYTHON="$PYTHON -m pytest" else if [[ ${SKIP_TESTS[$file]}s == ${NOT_INVERTED_TESTS} ]] ; then ((skipped++))