aboutsummaryrefslogtreecommitdiff
path: root/tests/test_wheel.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_wheel.c')
-rw-r--r--tests/test_wheel.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/test_wheel.c b/tests/test_wheel.c
index 99ac97c..6818b22 100644
--- a/tests/test_wheel.c
+++ b/tests/test_wheel.c
@@ -1,4 +1,5 @@
#include "testing.h"
+#include "wheel.h"
void test_get_wheel_file() {
struct testcase {
@@ -50,12 +51,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 +68,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);
}
}