Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some tests fail with -O (assertions off) #92886

Open
iritkatriel opened this issue May 17, 2022 · 2 comments
Open

some tests fail with -O (assertions off) #92886

iritkatriel opened this issue May 17, 2022 · 2 comments
Labels
easy tests type-bug

Comments

@iritkatriel
Copy link
Member

@iritkatriel iritkatriel commented May 17, 2022

On main (3.12 branch):

% ./python.exe -Om test -j2
[...]
10 tests failed:
test_clinic test_coroutines test_dis test_imaplib
test_multiprocessing_forkserver test_multiprocessing_spawn
test_py_compile test_sys_settrace test_wsgiref test_zipimport

This seems wrong because
(1) it indicates that some assertions should be exceptions instead.
(2) it implies that we don't have a buildbot testing with -O

@iritkatriel iritkatriel added type-bug tests labels May 17, 2022
@arunsl
Copy link

@arunsl arunsl commented May 19, 2022

Could reproduce issue with 4 test cases in windows with Python 3.9:

python -Om test -j2 test_clinic test_coroutines test_dis test_imaplib test_multiprocessing_forkserver test_multiprocess
ing_spawn test_py_compile test_sys_settrace test_wsgiref test_zipimport
0:00:00 Run tests in parallel using 2 child processes
0:00:01 [ 1/10] test_clinic skipped
test_clinic skipped -- clinic directory could not be found
0:00:01 [ 2/10/1] test_coroutines failed
test test_coroutines failed -- Traceback (most recent call last):
File "...\test\test_coroutines.py", line 1265, in test_with_5
run_async(func())
AssertionError: AssertionError not raised
0:00:31 load avg: 0.00 running: test_dis (30.0 sec), test_imaplib (30.0 sec)
0:00:36 load avg: 0.00 [ 3/10/1] test_dis passed -- running: test_imaplib (34.8 sec)
0:00:36 load avg: 0.00 [ 4/10/1] test_imaplib passed (34.4 sec)
0:01:06 load avg: 0.22 running: test_multiprocessing_forkserver (30.0 sec), test_multiprocessing_spawn (30.0 sec)
0:01:36 load avg: 0.16 running: test_multiprocessing_forkserver (1 min), test_multiprocessing_spawn (1 min)
0:01:58 load avg: 0.11 [ 5/10/1] test_multiprocessing_forkserver skipped -- running: test_multiprocessing_spawn (1 min 22 sec)
test_multiprocessing_forkserver skipped -- forkserver is not available on Windows
0:01:58 load avg: 0.11 [ 6/10/1] test_multiprocessing_spawn passed (1 min 21 sec)
0:01:59 load avg: 0.11 [ 7/10/1] test_sys_settrace passed
0:01:59 load avg: 0.11 [ 8/10/2] test_py_compile failed
test test_py_compile failed -- multiple errors occurred; run in verbose mode for details
0:01:59 load avg: 0.11 [ 9/10/3] test_wsgiref failed
test test_wsgiref failed -- multiple errors occurred; run in verbose mode for details
0:01:59 load avg: 0.11 [10/10/4] test_zipimport failed
test test_zipimport failed -- multiple errors occurred; run in verbose mode for details
== Tests result: FAILURE ==
4 tests OK.
4 tests failed:
test_coroutines test_py_compile test_wsgiref test_zipimport
2 tests skipped:
test_clinic test_multiprocessing_forkserver
Total duration: 1 min 59 sec
Tests result: FAILURE

python -m test -j2 test_coroutines test_py_compile test_wsgiref test_zipimport
0:00:00 Run tests in parallel using 2 child processes
0:00:01 [1/4] test_py_compile passed
0:00:01 [2/4] test_coroutines passed
0:00:02 [3/4] test_wsgiref passed
0:00:02 [4/4] test_zipimport passed
== Tests result: SUCCESS ==
All 4 tests OK.

@jackh-ncl
Copy link
Contributor

@jackh-ncl jackh-ncl commented May 24, 2022

Was able to reproduce this. I have a draft PR here: #93174 😃

miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jun 4, 2022
…maplib.py` (pythonGH-93237)

(cherry picked from commit 8150b8c)

Co-authored-by: jackh-ncl <1750152+jackh-ncl@users.noreply.github.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jun 4, 2022
…maplib.py` (pythonGH-93237)

(cherry picked from commit 8150b8c)

Co-authored-by: jackh-ncl <1750152+jackh-ncl@users.noreply.github.com>
miss-islington added a commit that referenced this issue Jun 4, 2022
….py` (GH-93237)

(cherry picked from commit 8150b8c)

Co-authored-by: jackh-ncl <1750152+jackh-ncl@users.noreply.github.com>
miss-islington added a commit that referenced this issue Jun 4, 2022
….py` (GH-93237)

(cherry picked from commit 8150b8c)

Co-authored-by: jackh-ncl <1750152+jackh-ncl@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy tests type-bug
Projects
None yet
4 participants