mirror of
https://github.com/arsenetar/send2trash.git
synced 2025-05-08 09:49:52 +00:00
Reindent test_plat_other
This commit is contained in:
parent
072e28cb1e
commit
f38aec6569
@ -21,8 +21,8 @@ def touch(path):
|
|||||||
|
|
||||||
class TestHomeTrash(unittest.TestCase):
|
class TestHomeTrash(unittest.TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.file = NamedTemporaryFile(dir=op.expanduser("~"),
|
self.file = NamedTemporaryFile(
|
||||||
prefix='send2trash_test', delete=False)
|
dir=op.expanduser("~"), prefix='send2trash_test', delete=False)
|
||||||
|
|
||||||
def test_trash(self):
|
def test_trash(self):
|
||||||
s2t(self.file.name)
|
s2t(self.file.name)
|
||||||
@ -33,6 +33,7 @@ class TestHomeTrash(unittest.TestCase):
|
|||||||
os.remove(op.join(HOMETRASH, 'files', name))
|
os.remove(op.join(HOMETRASH, 'files', name))
|
||||||
os.remove(op.join(HOMETRASH, 'info', name+'.trashinfo'))
|
os.remove(op.join(HOMETRASH, 'info', name+'.trashinfo'))
|
||||||
|
|
||||||
|
|
||||||
def _filesys_enc():
|
def _filesys_enc():
|
||||||
enc = sys.getfilesystemencoding()
|
enc = sys.getfilesystemencoding()
|
||||||
# Get canonical name of codec
|
# Get canonical name of codec
|
||||||
@ -89,8 +90,7 @@ class TestExtVol(unittest.TestCase):
|
|||||||
return 'dev'
|
return 'dev'
|
||||||
return st.st_dev
|
return st.st_dev
|
||||||
def s_ismount(path):
|
def s_ismount(path):
|
||||||
if op.realpath(path) in \
|
if op.realpath(path) in (op.realpath(self.trashTopdir), op.realpath(trashTopdir_b)):
|
||||||
(op.realpath(self.trashTopdir), op.realpath(trashTopdir_b)):
|
|
||||||
return True
|
return True
|
||||||
return old_ismount(path)
|
return old_ismount(path)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user