mirror of
https://github.com/arsenetar/send2trash.git
synced 2026-01-22 14:41:40 +00:00
fix(win): Prevent exception on empty list
Add check for when an empty list remains after preprocessing and do not continue for both legacy and modern windows implementations. Fix #71
This commit is contained in:
@@ -204,3 +204,17 @@ def test_trash_long_multifile_legacy(longfiles):
|
||||
# )
|
||||
# def test_trash_long_folder_legacy(self):
|
||||
# self._trash_folder(s2t_legacy)
|
||||
|
||||
|
||||
def test_trash_nothing_legacy():
|
||||
try:
|
||||
s2t_legacy([])
|
||||
except Exception as ex:
|
||||
assert False, f"Exception thrown when trashing nothing: {ex}"
|
||||
|
||||
|
||||
def test_trash_nothing_modern():
|
||||
try:
|
||||
s2t_modern([])
|
||||
except Exception as ex:
|
||||
assert False, f"Exception thrown when trashing nothing: {ex}"
|
||||
|
||||
Reference in New Issue
Block a user