Skip to content

Commit 3b9988d

Browse files
committed
Fix semantic errors in last commit
Signed-off-by: Hritik Vijay <hritikxx8@gmail.com>
1 parent 2fd2873 commit 3b9988d

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

tests/test_version_range.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -192,23 +192,26 @@ def test_VersionRange_contains_works_for_star_range(self):
192192

193193
SemverVersion("1.0.0") in VersionRange.from_string("vers:nginx/*")
194194

195+
195196
VERSION_RANGE_TESTS_BY_SCHEME = {
196197
"nginx": ["0.8.40+", "0.7.52-0.8.39", "0.9.10", "1.5.0+, 1.4.1+"],
197198
}
198199

199200

200-
@pytest.mark.xfail("Not all schemes are implemented yet")
201-
def test_all_schemes_are_tested_for_round_tripping(self):
202-
201+
@pytest.mark.xfail(reason="Not all schemes are implemented yet")
202+
def test_all_schemes_are_tested_for_round_tripping():
203+
untested_schemes = []
203204
for scheme in RANGE_CLASS_BY_SCHEMES:
204-
VERSION_RANGE_TESTS_BY_SCHEME[scheme]
205+
if scheme not in VERSION_RANGE_TESTS_BY_SCHEME:
206+
untested_schemes.append(scheme)
207+
assert not untested_schemes
205208

206209

207210
@pytest.mark.parametrize(
208211
"scheme, native_ranges",
209212
VERSION_RANGE_TESTS_BY_SCHEME.items(),
210213
)
211-
def test_from_native_and_from_string_round_trip(self, scheme, native_ranges):
214+
def test_from_native_and_from_string_round_trip(scheme, native_ranges):
212215

213216
range_class = RANGE_CLASS_BY_SCHEMES[scheme]
214217
for rng in native_ranges:

0 commit comments

Comments
 (0)