Skip to content

Commit e809b7b

Browse files
radoeringneersighted
authored andcommitted
tests: make tests forward compatible
1 parent ead1dfb commit e809b7b

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

tests/test_exporter.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2176,7 +2176,7 @@ def test_exporter_doesnt_confuse_repeated_packages(
21762176
io = BufferedIO()
21772177
exporter.export("requirements.txt", tmp_path, io)
21782178

2179-
expected = f"""\
2179+
expected_legacy = f"""\
21802180
celery==5.1.2 ; {MARKER_PY36_ONLY}
21812181
celery==5.2.3 ; {MARKER_PY37}
21822182
click-didyoumean==0.0.3 ; {MARKER_PY36_PY362}
@@ -2186,7 +2186,17 @@ def test_exporter_doesnt_confuse_repeated_packages(
21862186
click==8.0.3 ; {MARKER_PY37}
21872187
"""
21882188

2189-
assert io.fetch_output() == expected
2189+
expected = f"""\
2190+
celery==5.1.2 ; {MARKER_PY36_ONLY}
2191+
celery==5.2.3 ; {MARKER_PY37}
2192+
click-didyoumean==0.0.3 ; {MARKER_PY36_PY362}
2193+
click-didyoumean==0.3.0 ; {MARKER_PY362_PY40}
2194+
click-plugins==1.1.1 ; {MARKER_PY36}
2195+
click==7.1.2 ; {MARKER_PY36_ONLY}
2196+
click==8.0.3 ; {MARKER_PY37}
2197+
"""
2198+
2199+
assert io.fetch_output() in {expected, expected_legacy}
21902200

21912201

21922202
def test_exporter_handles_extras_next_to_non_extras(

0 commit comments

Comments
 (0)