mirror of
https://github.com/arsenetar/send2trash.git
synced 2025-05-08 17:59:50 +00:00
Compare commits
No commits in common. "0ef9b3294ac4f68fdb5fff0a599fa734348286de" and "be402728fb7f5f889961d38ca10648ac97379845" have entirely different histories.
0ef9b3294a
...
be402728fb
@ -6,7 +6,6 @@
|
|||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import os.path as op
|
import os.path as op
|
||||||
|
|
||||||
from send2trash.compat import text_type
|
from send2trash.compat import text_type
|
||||||
from send2trash.util import preprocess_paths
|
from send2trash.util import preprocess_paths
|
||||||
|
|
||||||
@ -143,8 +142,6 @@ def get_short_path_name(long_name):
|
|||||||
|
|
||||||
def send2trash(paths):
|
def send2trash(paths):
|
||||||
paths = preprocess_paths(paths)
|
paths = preprocess_paths(paths)
|
||||||
if not paths:
|
|
||||||
return
|
|
||||||
# convert data type
|
# convert data type
|
||||||
paths = [text_type(path, "mbcs") if not isinstance(path, text_type) else path for path in paths]
|
paths = [text_type(path, "mbcs") if not isinstance(path, text_type) else path for path in paths]
|
||||||
# convert to full paths
|
# convert to full paths
|
||||||
|
@ -17,8 +17,6 @@ from send2trash.win.IFileOperationProgressSink import create_sink
|
|||||||
|
|
||||||
def send2trash(paths):
|
def send2trash(paths):
|
||||||
paths = preprocess_paths(paths)
|
paths = preprocess_paths(paths)
|
||||||
if not paths:
|
|
||||||
return
|
|
||||||
# convert data type
|
# convert data type
|
||||||
paths = [text_type(path, "mbcs") if not isinstance(path, text_type) else path for path in paths]
|
paths = [text_type(path, "mbcs") if not isinstance(path, text_type) else path for path in paths]
|
||||||
# convert to full paths
|
# convert to full paths
|
||||||
|
@ -204,17 +204,3 @@ def test_trash_long_multifile_legacy(longfiles):
|
|||||||
# )
|
# )
|
||||||
# def test_trash_long_folder_legacy(self):
|
# def test_trash_long_folder_legacy(self):
|
||||||
# self._trash_folder(s2t_legacy)
|
# self._trash_folder(s2t_legacy)
|
||||||
|
|
||||||
|
|
||||||
def test_trash_nothing_legacy():
|
|
||||||
try:
|
|
||||||
s2t_legacy([])
|
|
||||||
except Exception as ex:
|
|
||||||
assert False, "Exception thrown when trashing nothing: {}".format(ex)
|
|
||||||
|
|
||||||
|
|
||||||
def test_trash_nothing_modern():
|
|
||||||
try:
|
|
||||||
s2t_modern([])
|
|
||||||
except Exception as ex:
|
|
||||||
assert False, "Exception thrown when trashing nothing: {}".format(ex)
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user