Coffee-fueled-deadlines / OSRSBytes

OSRSBytes is an all-in-one Python library for Old School Runescape (OSRS) that features Item Information Lookup, OSRS Hiscores, and Grand Exchange Market information.
Eclipse Public License 2.0
49 stars 13 forks source link

bug: getXPToNextLevel returns negative if player reaches 200m xp #9

Closed SaffatHasan closed 3 years ago

SaffatHasan commented 3 years ago

Expected Behavior Calling getXPToNextLevel after a player has reached 200m xp should return 0.

Actual Behavior

    def test_lookup(self):
        userName = 'Lynx Titan'
        skill = 'attack'

        actual = getXPToNextLevel(skill, userName)
        expected = 0
        assert actual == expected

Pytest output

E       AssertionError: assert -185608840 == 0
Coffee-fueled-deadlines commented 3 years ago

This should be fixed in dev now, will roll it out in an update soon. Thank you for your input.