google.takeout.paths: return Optional if there are no takeouts
This commit is contained in:
parent
4666378f7e
commit
e8e4994c02
6 changed files with 30 additions and 19 deletions
|
@ -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 = (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue