()
| 603 | ), |
| 604 | ) |
| 605 | def test_resolve_arbitrary_equality_issues_940(): |
| 606 | # type: (...) -> None |
| 607 | |
| 608 | def prepare_project(project_dir): |
| 609 | # type: (str) -> None |
| 610 | with open(os.path.join(project_dir, "pyproject.toml"), "w") as fp: |
| 611 | fp.write( |
| 612 | dedent( |
| 613 | """\ |
| 614 | [build-system] |
| 615 | # Setuptools 66 removed support for PEP-440 non-compliant versions. |
| 616 | # See: https://setuptools.pypa.io/en/stable/history.html#v66-0-0 |
| 617 | requires = ["setuptools<66"] |
| 618 | """ |
| 619 | ) |
| 620 | ) |
| 621 | |
| 622 | dist = create_sdist( |
| 623 | prepare_project=prepare_project, |
| 624 | name="foo", |
| 625 | version="1.0.2-fba4511", |
| 626 | python_requires=">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*", |
| 627 | ) |
| 628 | resolved_distributions = resolve( |
| 629 | requirements=[parse_requirement_string(dist)], |
| 630 | # We need this to allow the invalid version above to sneak by pip wheel metadata |
| 631 | # verification. |
| 632 | verify_wheels=False, |
| 633 | ).distributions |
| 634 | |
| 635 | assert len(resolved_distributions) == 1 |
| 636 | requirements = resolved_distributions[0].direct_requirements |
| 637 | assert 1 == len(requirements), ( |
| 638 | "The foo requirement was direct; so the resulting resolved distribution should carry the " |
| 639 | "associated requirement." |
| 640 | ) |
| 641 | assert "===1.0.2-fba4511" == str(requirements[0].specifier) |
| 642 | assert requirements[0].marker is None |
| 643 | |
| 644 | |
| 645 | def test_resolve_overlapping_requirements_discriminated_by_markers_issues_1196(py27): |
nothing calls this directly
no test coverage detected