core: expand '~' in get_files & import_dir

This commit is contained in:
Dima Gerasimov 2020-05-18 21:50:36 +01:00
parent 403ec18385
commit c8bdbfd69f
3 changed files with 13 additions and 3 deletions

View file

@ -26,6 +26,12 @@ def test_single_file():
)
"if the path starts with ~, we expand it"
assert get_files('~/.bashrc') == (
Path('~').expanduser() / '.bashrc',
)
def test_multiple_files():
'''
If you pass a directory/multiple directories, it flattens the contents