google.takeout.paths: return Optional if there are no takeouts

This commit is contained in:
Dima Gerasimov 2020-10-11 22:16:39 +01:00 committed by karlicoss
parent 4666378f7e
commit e8e4994c02
6 changed files with 30 additions and 19 deletions

View file

@ -33,6 +33,7 @@ import pytest # type: ignore
def test_parser(path: str):
path = 'Takeout/' + path
tpath = get_last_takeout(path=path)
assert tpath is not None
results = list(read_html(tpath, path))
# TODO assert len > 100 or something?
print(len(results))
@ -41,6 +42,7 @@ def test_parser(path: str):
def test_myactivity_search():
path = 'Takeout/My Activity/Search/MyActivity.html'
tpath = get_last_takeout(path=path)
assert tpath is not None
results = list(read_html(tpath, path))
res = (