Ad
  • Custom User Avatar

    The random tests keep failing, the code is working as it should, the test is just borked, example:

    Testing .page_item_count() method for 1 elements, 2 elements per page, page number -2
    [0]
    {0: [10]}
    -2
    It should work for random tests too: -1 should equal 2

    In this test, there is 1 element and 2 elements per page.
    If there is only 1 element, 1 is the max value which could be returned in any case. But since page number -2 is out of range, per spec, we should be returning a -1.
    Instead the test expects a value of 2... I don't see what I'm missing here.