aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@users.noreply.github.com>2024-10-04 16:12:26 -0400
committerGitHub <noreply@github.com>2024-10-04 16:12:26 -0400
commit70f76b377e2d35fa097b65a82fc7cac4f5f172d4 (patch)
tree7ff5169c28b1c14d91ab00452806a087d1562690 /tests
parent6e72330a3cc8d571b14f2234ed8fc2778b5e9b86 (diff)
parentbf1ecd2deb3c2d777efe93c0da6212bdbcc2240e (diff)
downloadstasis-70f76b377e2d35fa097b65a82fc7cac4f5f172d4.tar.gz
Merge pull request #51 from jhunkeler/wheel-funcs-clean-up
Clean up get_wheel_info
Diffstat (limited to 'tests')
-rw-r--r--tests/test_wheel.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test_wheel.c b/tests/test_wheel.c
index 99ac97c..16f60a3 100644
--- a/tests/test_wheel.c
+++ b/tests/test_wheel.c
@@ -50,12 +50,12 @@ void test_get_wheel_file() {
},
};
- struct Wheel *doesnotexist = get_wheel_file("doesnotexist", "doesnotexist-0.0.1-py2.py3-none-any.whl", (char *[]) {"not", NULL}, WHEEL_MATCH_ANY);
+ struct Wheel *doesnotexist = get_wheel_info("doesnotexist", "doesnotexist-0.0.1-py2.py3-none-any.whl", (char *[]) {"not", NULL}, WHEEL_MATCH_ANY);
STASIS_ASSERT(doesnotexist == NULL, "returned non-NULL on error");
for (size_t i = 0; i < sizeof(tc) / sizeof(*tc); i++) {
struct testcase *test = &tc[i];
- struct Wheel *wheel = get_wheel_file(".", test->expected.distribution, (char *[]) {(char *) test->expected.version, NULL}, WHEEL_MATCH_ANY);
+ struct Wheel *wheel = get_wheel_info(".", test->expected.distribution, (char *[]) {(char *) test->expected.version, NULL}, WHEEL_MATCH_ANY);
STASIS_ASSERT(wheel != NULL, "result should not be NULL!");
STASIS_ASSERT(wheel->file_name && strcmp(wheel->file_name, test->expected.file_name) == 0, "mismatched file name");
STASIS_ASSERT(wheel->version && strcmp(wheel->version, test->expected.version) == 0, "mismatched version");
@@ -67,6 +67,7 @@ void test_get_wheel_file() {
STASIS_ASSERT(strcmp(wheel->build_tag, test->expected.build_tag) == 0,
"mismatched build tag (optional arbitrary string)");
}
+ wheel_free(&wheel);
}
}