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

bpo-34279: regrtest consider that skipped tests are ran #11132

Merged
merged 1 commit into from Dec 14, 2018

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Dec 12, 2018

bpo-34279, bpo-35412: support.run_unittest() no longer raise
TestDidNotRun if the test result contains skipped tests. The
exception is now only raised if no test have been run and no test
have been skipped.

bpo-34279, bpo-35412: support.run_unittest() no longer raise
TestDidNotRun if the test result contains skipped tests. The
exception is now only raised if no test have been run and no test
have been skipped.
@vstinner
Copy link
Member Author

vstinner commented Dec 12, 2018

With this change:

$ ./python -m test test_dtrace -v
== CPython 3.8.0a0 (heads/platform_macos9:720f137b5e, Dec 12 2018, 16:30:08) [GCC 8.2.1 20181105 (Red Hat 8.2.1-5)]
== Linux-4.19.3-300.fc29.x86_64-x86_64-with-glibc2.28 little-endian
== cwd: /home/vstinner/prog/python/master/build/test_python_6308
== CPU count: 8
== encodings: locale=UTF-8, FS=utf-8
Run tests sequentially
0:00:00 load avg: 0.58 [1/1] test_dtrace
skipped 'dtrace(1) failed: /usr/bin/dtrace invalid option -q\nUsage /usr/bin/dtrace [--help] [-h | -G] [-C [-I<Path>]] -s File.d [-o <File>]'
skipped 'dtrace(1) failed: /usr/bin/dtrace invalid option -q\nUsage /usr/bin/dtrace [--help] [-h | -G] [-C [-I<Path>]] -s File.d [-o <File>]'
skipped "stap(1) failed: [Errno 2] No such file or directory: 'stap'"
skipped "stap(1) failed: [Errno 2] No such file or directory: 'stap'"

----------------------------------------------------------------------

Ran 0 tests in 0.123s

OK (skipped=4)

== Tests result: SUCCESS ==

1 test OK.

Total duration: 249 ms
Tests result: SUCCESS

Without this change:

$ ./python -m test test_dtrace -v
== CPython 3.8.0a0 (heads/platform_macos9:720f137b5e, Dec 12 2018, 16:30:08) [GCC 8.2.1 20181105 (Red Hat 8.2.1-5)]
== Linux-4.19.3-300.fc29.x86_64-x86_64-with-glibc2.28 little-endian
== cwd: /home/vstinner/prog/python/master/build/test_python_6411
== CPU count: 8
== encodings: locale=UTF-8, FS=utf-8
Run tests sequentially
0:00:00 load avg: 0.38 [1/1] test_dtrace
skipped 'dtrace(1) failed: /usr/bin/dtrace invalid option -q\nUsage /usr/bin/dtrace [--help] [-h | -G] [-C [-I<Path>]] -s File.d [-o <File>]'
skipped 'dtrace(1) failed: /usr/bin/dtrace invalid option -q\nUsage /usr/bin/dtrace [--help] [-h | -G] [-C [-I<Path>]] -s File.d [-o <File>]'
skipped "stap(1) failed: [Errno 2] No such file or directory: 'stap'"
skipped "stap(1) failed: [Errno 2] No such file or directory: 'stap'"

----------------------------------------------------------------------

Ran 0 tests in 0.124s

OK (skipped=4)
test_dtrace run no tests

== Tests result: NO TEST RUN ==

1 test run no tests:
    test_dtrace

Total duration: 250 ms
Tests result: NO TEST RUN

@miss-islington
Copy link
Contributor

miss-islington commented Dec 14, 2018

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 2.7, 3.6, 3.7.
🐍🍒🤖

@vstinner vstinner deleted the regrtest_skipped branch Dec 14, 2018
@bedevere-bot
Copy link

bedevere-bot commented Dec 14, 2018

GH-11155 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 14, 2018
bpo-34279, bpo-35412: support.run_unittest() no longer raises
TestDidNotRun if a test result contains skipped tests. The
exception is now only raised if no test have been run and no test
have been skipped.
(cherry picked from commit 3a8f4fe)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
@bedevere-bot
Copy link

bedevere-bot commented Dec 14, 2018

GH-11156 is a backport of this pull request to the 3.6 branch.

@miss-islington
Copy link
Contributor

miss-islington commented Dec 14, 2018

Sorry, @vstinner, I could not cleanly backport this to 2.7 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 3a8f4fef4a4dd0e4a800545468eef9542e126181 2.7

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 14, 2018
bpo-34279, bpo-35412: support.run_unittest() no longer raises
TestDidNotRun if a test result contains skipped tests. The
exception is now only raised if no test have been run and no test
have been skipped.
(cherry picked from commit 3a8f4fe)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
@bedevere-bot
Copy link

bedevere-bot commented Dec 14, 2018

GH-11158 is a backport of this pull request to the 2.7 branch.

miss-islington added a commit that referenced this pull request Dec 14, 2018
bpo-34279, bpo-35412: support.run_unittest() no longer raises
TestDidNotRun if a test result contains skipped tests. The
exception is now only raised if no test have been run and no test
have been skipped.
(cherry picked from commit 3a8f4fe)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
vstinner added a commit that referenced this pull request Dec 14, 2018
…H-11158)

bpo-34279, bpo-35412: support.run_unittest() no longer raises
TestDidNotRun if a test result contains skipped tests. The
exception is now only raised if no test have been run and no test
have been skipped.

(cherry picked from commit 3a8f4fe)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants