mirror of
https://github.com/arsenetar/send2trash.git
synced 2025-05-08 09:49:52 +00:00
Fix test folders not getting removed
This commit is contained in:
parent
959f9044ae
commit
7c4ab4ff7e
@ -1,5 +1,6 @@
|
||||
# coding: utf-8
|
||||
import os
|
||||
import shutil
|
||||
import sys
|
||||
import unittest
|
||||
from os import path as op
|
||||
@ -16,10 +17,7 @@ class TestNormal(unittest.TestCase):
|
||||
self._create_tree(self.file)
|
||||
|
||||
def tearDown(self):
|
||||
try:
|
||||
os.remove(self.dirname)
|
||||
except OSError:
|
||||
pass
|
||||
shutil.rmtree(self.dirname, ignore_errors=True)
|
||||
|
||||
def _create_tree(self, path):
|
||||
dirname = op.dirname(path)
|
||||
@ -50,10 +48,7 @@ class TestLongPath(unittest.TestCase):
|
||||
self._create_tree(self.file)
|
||||
|
||||
def tearDown(self):
|
||||
try:
|
||||
os.remove(self.dirname)
|
||||
except OSError:
|
||||
pass
|
||||
shutil.rmtree(self.dirname, ignore_errors=True)
|
||||
|
||||
def _create_tree(self, path):
|
||||
dirname = op.dirname(path)
|
||||
|
Loading…
x
Reference in New Issue
Block a user