Skip to content

Commit

Permalink
reformatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhuyi Xue committed Oct 17, 2021
1 parent 98c8060 commit 2f8abf5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/test_cli_compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -1798,7 +1798,7 @@ def test_combine_different_extras_of_the_same_package(
with open("requirements.in", "w") as req_in:
req_in.writelines(
[
f"fake-ray[default]==0.1\n",
"fake-ray[default]==0.1\n",
"fake-tune-sklearn==0.7\n",
]
)
Expand Down
7 changes: 5 additions & 2 deletions tests/test_resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,16 +341,19 @@ def test_combine_install_requirements_extras_no_req(
)


def test_combine_install_requirements_with_multiple_extras_reset_prepared(repository, from_line):
def test_combine_install_requirements_with_multiple_extras_reset_prepared(
repository, from_line
):
"""Regression test for https://github.com/jazzband/pip-tools/pull/1512/files."""
pkg1 = from_line("ray[default]==1.1.1")
pkg1.prepared = True
pkg2 = from_line("ray[tune]==1.1.1")
combined = combine_install_requirements(repository, [pkg1, pkg2])

assert str(combined) == 'ray[default,tune]==1.1.1'
assert str(combined) == "ray[default,tune]==1.1.1"
assert combined.prepared is False


def test_compile_failure_shows_provenance(resolver, from_line):
"""
Provenance of conflicting dependencies should be printed on failure.
Expand Down

0 comments on commit 2f8abf5

Please sign in to comment.