Skip to content

Commit

Permalink
forwards-compatible tests deduplicating extras (#8426)
Browse files Browse the repository at this point in the history
  • Loading branch information
dimbleby authored Sep 11, 2023
1 parent 398523c commit 6b1a640
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions tests/puzzle/test_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,10 +426,11 @@ def test_search_for_directory_poetry(
get_dependency("cachy", ">=0.2.0"),
get_dependency("pendulum", ">=1.4.4"),
]
assert package.extras == {
"extras-a": [get_dependency("pendulum", ">=1.4.4")],
"extras-b": [get_dependency("cachy", ">=0.2.0")],
}
extras_a = canonicalize_name("extras-a")
extras_b = canonicalize_name("extras-b")
assert set(package.extras) == {extras_a, extras_b}
assert set(package.extras[extras_a]) == {get_dependency("pendulum", ">=1.4.4")}
assert set(package.extras[extras_b]) == {get_dependency("cachy", ">=0.2.0")}


def test_search_for_directory_poetry_with_extras(
Expand Down Expand Up @@ -457,10 +458,11 @@ def test_search_for_directory_poetry_with_extras(
get_dependency("cachy", ">=0.2.0"),
get_dependency("pendulum", ">=1.4.4"),
]
assert package.extras == {
"extras-a": [get_dependency("pendulum", ">=1.4.4")],
"extras-b": [get_dependency("cachy", ">=0.2.0")],
}
extras_a = canonicalize_name("extras-a")
extras_b = canonicalize_name("extras-b")
assert set(package.extras) == {extras_a, extras_b}
assert set(package.extras[extras_a]) == {get_dependency("pendulum", ">=1.4.4")}
assert set(package.extras[extras_b]) == {get_dependency("cachy", ">=0.2.0")}


def test_search_for_file_sdist(
Expand Down

0 comments on commit 6b1a640

Please sign in to comment.