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

Erroneous test suite skips due to "" vs. None #10292

Closed
twisted-trac opened this issue Jan 17, 2022 · 5 comments
Closed

Erroneous test suite skips due to "" vs. None #10292

twisted-trac opened this issue Jan 17, 2022 · 5 comments

Comments

@twisted-trac
Copy link

twm's avatar @twm reported
Trac ID trac#10292
Type defect
Created 2022-01-17 03:28:07Z
Branch https://github.com/twisted/twisted/tree/10292-bad-skips

#1678 became a problem because the relevant test cases were skipped on all platforms due to code with this pattern:

if hasTheThing:
    skipFoo = ""  # Intent: don't skip
else:
    skipFoo = "don't have the thing"

class FooTests(TestCase):
    skip = skipFoo

    ...

However, the empty string here still skips. None is the sentinel value to not skip. There are a bunch of places this pattern appears in the codebase.

Searchable metadata
trac-id__10292 10292
type__defect defect
reporter__twm twm
priority__high high
milestone__None None
branch__10292_bad_skips 10292-bad-skips
branch_author__ 
status__closed closed
resolution__fixed fixed
component__core core
keywords__None None
time__1642390087277284 1642390087277284
changetime__1642571034521966 1642571034521966
version__None None
owner__twm twm

@twisted-trac
Copy link
Author

twm's avatar @twm set owner to @twm
@twm set status to assigned

@twisted-trac
Copy link
Author

twm's avatar @twm commented

#1682

@twisted-trac
Copy link
Author

twm's avatar @twm removed owner
@twm set status to new

#1682

@twisted-trac
Copy link
Author

glyph's avatar @glyph set owner to @twm

@twisted-trac
Copy link
Author

twm's avatar @twm set status to closed

Merged: 7039a20

Thanks for the review Glyph!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants