Test for invalid markers
Stefano Rivera
2 years ago
276 | 276 | 'implementation_name_pypy': 'python3-implementation-name-pypy', |
277 | 277 | 'implementation_version_lt35': 'python3-implementation-version-lt35', |
278 | 278 | 'implementation_version_ge35': 'python3-implementation-version-ge35', |
279 | 'invalid_marker': 'python3-invalid-marker', | |
279 | 280 | 'extra_feature': 'python3-extra-feature', |
280 | 281 | 'extra_test': 'python3-extra-test', |
281 | 282 | 'complex_marker': 'python3-complex-marker', |
344 | 345 | "implementation_version < '3.5'", |
345 | 346 | "Requires-Dist: implementation_version_ge35; " |
346 | 347 | "implementation_version >= '3.5'", |
348 | "Requires-Dist: invalid_marker; invalid_marker > '1'", | |
347 | 349 | "Requires-Dist: extra_feature; extra == 'feature'", |
348 | 350 | "Requires-Dist: extra_test; extra == 'test'", |
349 | 351 | "Requires-Dist: complex_marker; os_name != 'windows' " |
504 | 506 | def test_depends_on_sys_implementation_ge35_packages(self): |
505 | 507 | self.assertIn('python3-implementation-version-ge35 | python3 (<< 3.5)', |
506 | 508 | self.d.depends) |
509 | ||
510 | def test_ignores_invalid_marker(self): | |
511 | self.assertNotInDepends('python3-invalid-marker') | |
507 | 512 | |
508 | 513 | def test_depends_on_extra_feature_packages(self): |
509 | 514 | self.assertIn('python3-extra-feature', self.d.depends) |
604 | 609 | "implementation_version_lt35", |
605 | 610 | "[:implementation_version >= '3.5']", |
606 | 611 | "implementation_version_ge35", |
612 | "[:invalid_marker > '1']", | |
613 | "invalid_marker", | |
607 | 614 | "[feature]", |
608 | 615 | "extra_feature", |
609 | 616 | "[test]", |