Skip to content

Commit

Permalink
test: update wheel used in tests (#159)
Browse files Browse the repository at this point in the history
  • Loading branch information
parthea committed Nov 29, 2023
1 parent a5a320e commit d75ec3d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion tests/unit/resources/bad_package/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
requirements = [
"requests", # no lower bound
"packaging>=14.0, !=15.0, <22.0.0", # too complex for tool
"wheel<0.36.0",
"wheel<0.42.0",
"click==7.0.0",
]

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/resources/good_package/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
requirements = [
"requests>=1.0.0",
"packaging>=14.0, <22.0.0",
"wheel<0.36.0, >=0.35.0",
"wheel<0.42.0, >=0.41.0",
"click==7.0.0",
]

Expand Down
14 changes: 7 additions & 7 deletions tests/unit/test_lower_bound_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,15 @@ def test_update_constraints():

output = constraints_path.read_text().split("\n")

assert output == ["click==7.0.0", "grpcio==1.0.0", "packaging==14.0", "requests==1.0.0", "wheel==0.35.0",]
assert output == ["click==7.0.0", "grpcio==1.0.0", "packaging==14.0", "requests==1.0.0", "wheel==0.41.0",]



def test_update_constraints_overwrites_existing_file():
constraints = [
"requests==1.0.0",
"packaging==13.0",
"wheel==0.36.0",
"wheel==0.42.0",
"click==5.0.0",
]
with constraints_file(constraints) as c:
Expand All @@ -107,14 +107,14 @@ def test_update_constraints_overwrites_existing_file():
assert result.exit_code == 0

output = c.read_text().split("\n")
assert output == ["click==7.0.0", "grpcio==1.0.0", "packaging==14.0", "requests==1.0.0", "wheel==0.35.0",
assert output == ["click==7.0.0", "grpcio==1.0.0", "packaging==14.0", "requests==1.0.0", "wheel==0.41.0",
]

def test_update_constraints_with_setup_py_missing_lower_bounds():
constraints = [
"requests==1.0.0",
"packaging==14.0",
"wheel==0.35.0",
"wheel==0.41.0",
"click==7.0.0",
]
with constraints_file(constraints) as c:
Expand All @@ -134,7 +134,7 @@ def test_check():
constraints = [
"requests==1.0.0",
"packaging==14.0",
"wheel==0.35.0",
"wheel==0.41.0",
"click==7.0.0",
"grpcio==1.0.0"
]
Expand All @@ -150,7 +150,7 @@ def test_update_constraints_with_extra_constraints():
constraints = [
"requests==1.0.0",
"packaging==14.0",
"wheel==0.35.0",
"wheel==0.41.0",
"click==7.0.0",
"grpcio==1.0.0",
"pytest==6.0.0", # additional requirement
Expand Down Expand Up @@ -218,7 +218,7 @@ def test_check_with_constraints_file_different_versions():
constraints = [
"requests==1.2.0", # setup.py has 1.0.0
"packaging==14.1", # setup.py has 14.0
"wheel==0.36.0", # setup.py has 0.35.0
"wheel==0.42.0", # setup.py has 0.41.0
"click==7.0.0",
"grpcio==1.0.0"
]
Expand Down

0 comments on commit d75ec3d

Please sign in to comment.