Skip to content

Dropping python2 silently broke several tests #9580

Open
@hexagonrecursion

Description

@hexagonrecursion

I have found a couple tests that seem to be counting on python 2 to test the behavior they are designed to test even though the behaviour is not python2-specific. This is not pythin2 compatibility code but rather tests relying on python2 eg to test that markers work. Dropping python2 silently broke the tests - they no longer test what they were designed to test.

assert simplewheel.__version__ == '1.0' if sys.version_info < (3,) else '2.0'

expected = ['1.0.0', '9.9.9']
if (2, 7) < sys.version_info < (3,):
expected.append('2.7.0')
elif sys.version_info > (3, 3):
expected.append('3.3.0')

pip/tests/unit/test_req.py

Lines 142 to 145 in bbf8466

if sys.version_info[:2] == (2, 7):
assert reqset.has_requirement('simple')
else:
assert not reqset.has_requirement('simple')

Metadata

Metadata

Assignees

No one assigned

    Labels

    C: testsTesting and related things

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions