From 31638fdbb5e980a8dcb25a16e67bc3954c1efda5 Mon Sep 17 00:00:00 2001 From: CFDeadlines <47742787+Coffee-fueled-deadlines@users.noreply.github.com> Date: Fri, 10 Nov 2023 13:18:39 -0500 Subject: [PATCH] Update hiscores_test.py Adjusted test to account for issues as show in issue# 46 --- OSRSBytes/tests/hiscores_test.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/OSRSBytes/tests/hiscores_test.py b/OSRSBytes/tests/hiscores_test.py index 0e03f11..d7d05b9 100644 --- a/OSRSBytes/tests/hiscores_test.py +++ b/OSRSBytes/tests/hiscores_test.py @@ -7,8 +7,14 @@ def test(verbose = True): for skill in boss_user.getSkillsGenerator(): try: - assert boss_user.skill(skill, "rank"), "Failed" + assert boss_user.skill(skill, "rank"), "Failed" + # Assert that value, when converted to Int, is Int + assert type(int(boss_user.skill(skill, "rank"))) == int, "Failed" assert boss_user.skill(skill, "level"), "Failed" + # Assert that value, when converted to Int, is Int + assert type(int(boss_user.skill(skill, "level"))) == int, "Failed" + # Assert that value, when converted to Int, is Int + assert type(int(boss_user.skill(skill, "experience"))) == int, "Failed" except: failed_tests.append(skill) if (verbose): @@ -71,4 +77,4 @@ def test(verbose = True): if len(failed_tests) == 0: return True else: - return False \ No newline at end of file + return False