core: add warning when get_files returns no files, my.twitter.archive: make more defensive in case of no archives

This commit is contained in:
Dima Gerasimov 2020-05-24 12:51:23 +01:00
parent b7662378a2
commit b99b2f3cfa
3 changed files with 29 additions and 12 deletions

View file

@ -97,6 +97,15 @@ def test_implicit_glob():
Path('/tmp/hpi_test/456/file.zip'),
)
def test_no_files():
'''
Test for empty matches. They work, but should result in warning
'''
assert get_files([]) == ()
assert get_files('bad*glob') == ()
# TODO not sure if should uniquify if the filenames end up same?
# TODO not sure about the symlinks? and hidden files?