Skip to content

Commit

Permalink
Fix & update unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
raydouglass committed Nov 21, 2024
1 parent 4872e6d commit f8a9351
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion tests/test_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ def set_cwd(cwd: os.PathLike) -> Generator:
@pytest.mark.parametrize(
["unencoded", "encoded"],
[
(RAPIDSPackage(), {"publishes_prereleases": True, "has_cuda_suffix": True}),
(RAPIDSPackage(), {"publishes_prereleases": True, "has_cuda_suffix": True, "has_conda_package": True, "has_wheel_package": True}),
(RAPIDSPackage(has_conda_package=False), {"publishes_prereleases": True, "has_cuda_suffix": True, "has_conda_package": False, "has_wheel_package": True}),
(RAPIDSPackage(has_wheel_package=False), {"publishes_prereleases": True, "has_cuda_suffix": True, "has_conda_package": True, "has_wheel_package": False}),
(
RAPIDSRepository(
packages={
Expand All @@ -58,10 +60,14 @@ def set_cwd(cwd: os.PathLike) -> Generator:
"package1": {
"publishes_prereleases": True,
"has_cuda_suffix": True,
"has_conda_package": True,
"has_wheel_package": True
},
"package2": {
"publishes_prereleases": False,
"has_cuda_suffix": False,
"has_conda_package": True,
"has_wheel_package": True
},
},
},
Expand Down Expand Up @@ -92,6 +98,8 @@ def set_cwd(cwd: os.PathLike) -> Generator:
"package": {
"publishes_prereleases": True,
"has_cuda_suffix": True,
"has_conda_package": True,
"has_wheel_package": True
},
},
},
Expand All @@ -100,6 +108,8 @@ def set_cwd(cwd: os.PathLike) -> Generator:
"proprietary-package": {
"publishes_prereleases": True,
"has_cuda_suffix": True,
"has_conda_package": True,
"has_wheel_package": True
},
},
},
Expand Down Expand Up @@ -151,7 +161,9 @@ def test_metadata_encoder(unencoded, encoded):
'"repo1":{'
'"packages":{'
'"package":{'
'"has_conda_package":true,'
'"has_cuda_suffix":true,'
'"has_wheel_package":true,'
'"publishes_prereleases":true'
"}"
"}"
Expand All @@ -171,7 +183,9 @@ def test_metadata_encoder(unencoded, encoded):
'"repo2":{'
'"packages":{'
'"package":{'
'"has_conda_package":true,'
'"has_cuda_suffix":true,'
'"has_wheel_package":true,'
'"publishes_prereleases":true'
"}"
"}"
Expand All @@ -191,7 +205,9 @@ def test_metadata_encoder(unencoded, encoded):
'"repo2":{'
'"packages":{'
'"package":{'
'"has_conda_package":true,'
'"has_cuda_suffix":true,'
'"has_wheel_package":true,'
'"publishes_prereleases":true'
"}"
"}"
Expand All @@ -211,7 +227,9 @@ def test_metadata_encoder(unencoded, encoded):
'"repo1":{'
'"packages":{'
'"package":{'
'"has_conda_package":true,'
'"has_cuda_suffix":true,'
'"has_wheel_package":true,'
'"publishes_prereleases":true'
"}"
"}"
Expand All @@ -223,7 +241,9 @@ def test_metadata_encoder(unencoded, encoded):
'"repo2":{'
'"packages":{'
'"package":{'
'"has_conda_package":true,'
'"has_cuda_suffix":true,'
'"has_wheel_package":true,'
'"publishes_prereleases":true'
"}"
"}"
Expand All @@ -245,7 +265,9 @@ def test_metadata_encoder(unencoded, encoded):
"repo1": {
"packages": {
"package": {
"has_conda_package": true,
"has_cuda_suffix": true,
"has_wheel_package": true,
"publishes_prereleases": true
}
}
Expand Down

0 comments on commit f8a9351

Please sign in to comment.