Update lastfm order/tests/docs

This commit is contained in:
Dima Gerasimov 2020-05-13 20:35:47 +01:00
parent 522bfff679
commit eba2d26b31
3 changed files with 42 additions and 6 deletions

View file

@ -1,3 +1,7 @@
from my.core.cachew import disable_cachew
# TODO need something nicer and integrated inside cachew..
disable_cachew() # meh
from more_itertools import ilen
from my.lastfm import scrobbles
@ -5,3 +9,9 @@ from my.lastfm import scrobbles
def test():
assert ilen(scrobbles()) > 1000
def test_datetime_ascending():
from more_itertools import pairwise
for a, b in pairwise(scrobbles()):
assert a.dt <= b.dt