Sitelet https://github.com/python/cpython/issues/92886
Skip to content

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

Description

@iritkatriel

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

  • test_clinic
  • test_coroutines
  • test_dis
  • test_imaplib
  • test_multiprocessing_forkserver
  • test_multiprocessing_spawn
  • test_py_compile
  • test_sys_settrace
  • test_wsgiref
  • test_zipimport

Activity

  1. added
    type-bugAn unexpected behavior, bug, or error
    testsTests in the Lib/test dir
    on May 17, 2022
  2. arunsl commented on May 19, 2022

    @arunsl

    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.

  3. jackh-ncl commented on May 24, 2022

    @jackh-ncl
    Contributor

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

  4. added a commit that references this issue on Jun 4, 2022
  5. added 4 commits that reference this issue on Jun 4, 2022
  6. added a commit that references this issue on Jun 10, 2022
  7. added 2 commits that reference this issue on Jun 10, 2022
  8. brettcannon commented on Jun 10, 2022

    @brettcannon
    Member

    I have created a checklist of the failing tests and checked off the ones that look to have merged PRs that fixed them.

  9. added a commit that references this issue on Jun 10, 2022
  10. 13 remaining items

  11. added 3 commits that reference this issue on Oct 8, 2022
  12. added 3 commits that reference this issue on Oct 11, 2022
  13. added 4 commits that reference this issue on Oct 18, 2022
  14. iritkatriel commented on Oct 19, 2022

    @iritkatriel
    MemberAuthor

    Thank you @jackh-ncl !

  15. added a commit that references this issue on Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    easytestsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions