-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
Regression tests pass but return unnecessary output (errors and warnings) #103186
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
Comments
First challenge, how do I assign this issue to myself? |
It's an open project, no preliminary assignment is required. |
Thank you for tackling this. Multiple PRs for one issue are allowed and for this issue I would encourage them -- even one for each test file or directory. The commit message, fix strategy and difficulty, possible controversy, reviewer/committers, and backports might vary for each. |
Thanks Terry, I've managed to find fixes for some of the tests - will raise a few PR's shortly. I'll leave the deprecation warnings for the end; interestingly it's not immediately clear whether newer replacement code exists for all deprecated classes / methods / functions (e.g sre_compile / sre_constants) |
I've made some progress in tracing this error under test_tools.test_freeze_simple_script:
This is caused by the following file being unavailable in the intermediate build, despite being copied: Looks like a timing issue in |
Closing as a duplicate of (now fixed) gh-102151. |
Reopening because I didn't notice there are three more attached PRs. |
Reduce test noise by fixing or catching and testing stderr messages from individual tests. test_cmd_line_script.test_script_as_dev_fd calls spawn_python and hence subprocess.Popen with incompatible arguments. On POSIX, pass_fds forces close_fds to be True (subprocess.py line 848). Correct the call. test_uuid.test_cli_namespace_required_for_uuid3: when the namespace is omitted, uuid.main calls argparse.Argument_Parser.error, which prints to stderr before calling sys.exit, which raises SystemExit. Unittest assertRaises catches the exception but not the previous output. Catch the output and test it. test_warnings.test_catchwarnings_with_simplefilter_error similarly prints before raising. Catch the output and test it. --------- Co-authored-by: Oleg Iarygin <[email protected]>
…ythonGH-103196) Reduce test noise by fixing or catching and testing stderr messages from individual tests. test_cmd_line_script.test_script_as_dev_fd calls spawn_python and hence subprocess.Popen with incompatible arguments. On POSIX, pass_fds forces close_fds to be True (subprocess.py line 848). Correct the call. test_uuid.test_cli_namespace_required_for_uuid3: when the namespace is omitted, uuid.main calls argparse.Argument_Parser.error, which prints to stderr before calling sys.exit, which raises SystemExit. Unittest assertRaises catches the exception but not the previous output. Catch the output and test it. test_warnings.test_catchwarnings_with_simplefilter_error similarly prints before raising. Catch the output and test it. --------- (cherry picked from commit 9d58225) Co-authored-by: Ijtaba Hussain <[email protected]> Co-authored-by: Oleg Iarygin <[email protected]>
…ests (python#103196) Reduce test noise by fixing or catching and testing stderr messages from individual tests. test_cmd_line_script.test_script_as_dev_fd calls spawn_python and hence subprocess.Popen with incompatible arguments. On POSIX, pass_fds forces close_fds to be True (subprocess.py line 848). Correct the call. test_uuid.test_cli_namespace_required_for_uuid3: when the namespace is omitted, uuid.main calls argparse.Argument_Parser.error, which prints to stderr before calling sys.exit, which raises SystemExit. Unittest assertRaises catches the exception but not the previous output. Catch the output and test it. test_warnings.test_catchwarnings_with_simplefilter_error similarly prints before raising. Catch the output and test it. --------- Co-authored-by: Oleg Iarygin <[email protected]> (cherry picked from commit 9d58225)
…H-103196) (#106605) gh-103186: Fix or catch 'extra' stderr output from unittests (GH-103196) Reduce test noise by fixing or catching and testing stderr messages from individual tests. test_cmd_line_script.test_script_as_dev_fd calls spawn_python and hence subprocess.Popen with incompatible arguments. On POSIX, pass_fds forces close_fds to be True (subprocess.py line 848). Correct the call. test_uuid.test_cli_namespace_required_for_uuid3: when the namespace is omitted, uuid.main calls argparse.Argument_Parser.error, which prints to stderr before calling sys.exit, which raises SystemExit. Unittest assertRaises catches the exception but not the previous output. Catch the output and test it. test_warnings.test_catchwarnings_with_simplefilter_error similarly prints before raising. Catch the output and test it. --------- (cherry picked from commit 9d58225) Co-authored-by: Ijtaba Hussain <[email protected]> Co-authored-by: Oleg Iarygin <[email protected]>
…103196) (#106606) Reduce test noise by fixing or catching and testing stderr messages from individual tests. test_cmd_line_script.test_script_as_dev_fd calls spawn_python and hence subprocess.Popen with incompatible arguments. On POSIX, pass_fds forces close_fds to be True (subprocess.py line 848). Correct the call. test_uuid.test_cli_namespace_required_for_uuid3: when the namespace is omitted, uuid.main calls argparse.Argument_Parser.error, which prints to stderr before calling sys.exit, which raises SystemExit. Unittest assertRaises catches the exception but not the previous output. Catch the output and test it. test_warnings.test_catchwarnings_with_simplefilter_error similarly prints before raising. Catch the output and test it. --------- Co-authored-by: Oleg Iarygin <[email protected]> (cherry picked from commit 9d58225)
…ce directory (#103213) Fetch CONFIG_ARGS from the original source directory, instead of from the copied source tree. When "make clean" is executed in the copied source tree, the build directory is cleared and the configure argument lookup fails. However, the original source directory still contains this information.
…l source directory (pythonGH-103213) Fetch CONFIG_ARGS from the original source directory, instead of from the copied source tree. When "make clean" is executed in the copied source tree, the build directory is cleared and the configure argument lookup fails. However, the original source directory still contains this information. (cherry picked from commit de82732) Co-authored-by: Ijtaba Hussain <[email protected]>
…ettrace (GH-103244) Caused as a result of frame manipulation where locals are never assigned / initialised.
…_sys_settrace (pythonGH-103244) Caused as a result of frame manipulation where locals are never assigned / initialised. (cherry picked from commit 3e53ac9) Co-authored-by: Ijtaba Hussain <[email protected]>
…r in test_sys_settrace
…9077) (cherry picked from commit e4bb002) Co-authored-by: Serhiy Storchaka <[email protected]>
…9077) (cherry picked from commit e4bb002) Co-authored-by: Serhiy Storchaka <[email protected]>
…est_sys_settrace (GH-109075)
…iterator in test_sys_settrace (pythonGH-109075). (cherry picked from commit d485551) Co-authored-by: Serhiy Storchaka <[email protected]>
…GH-109085) (cherry picked from commit e4bb002) Co-authored-by: Serhiy Storchaka <[email protected]>
Thank you for sharing! |
Print additional details only when tests are run with -vv.
Print additional details only when tests are run with -vv.
…t_sys_settrace (GH-103244) (#109066) gh-103186: Suppress and assert expected RuntimeWarnings in test_sys_settrace (GH-103244) Caused as a result of frame manipulation where locals are never assigned / initialised. (cherry picked from commit 3e53ac9) Co-authored-by: Ijtaba Hussain <[email protected]>
…r in test_sys_settrace (pythonGH-109075) (cherry picked from commit d485551) Co-authored-by: Serhiy Storchaka <[email protected]>
Hi Team, |
Just built python for the first time using the devguide and I noticed some (deprecation) warnings and errors in the regression tests, even though all the tests (that ran) passed.
Will attempt to investigate and patch these where appropriate.
Raising this issue as a base for my first pull request.
Any feedback is welcome!
Linked PRs
The text was updated successfully, but these errors were encountered: