mirror of
https://gitlab.com/mishakmak/pam-fprint-grosshack.git
synced 2026-04-09 12:23:34 +02:00
tests/fprintd: Use addCleanup to ensure we remove the test dir
This commit is contained in:
committed by
Bastien Nocera
parent
24cd986476
commit
cefe939141
@ -256,12 +256,10 @@ class FPrintdTest(dbusmock.DBusTestCase):
|
|||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.test_dir = tempfile.mkdtemp()
|
self.test_dir = tempfile.mkdtemp()
|
||||||
|
self.addCleanup(shutil.rmtree, self.test_dir)
|
||||||
self.state_dir = os.path.join(self.test_dir, 'state')
|
self.state_dir = os.path.join(self.test_dir, 'state')
|
||||||
self.run_dir = os.path.join(self.test_dir, 'run')
|
self.run_dir = os.path.join(self.test_dir, 'run')
|
||||||
|
|
||||||
def tearDown(self):
|
|
||||||
shutil.rmtree(self.test_dir)
|
|
||||||
|
|
||||||
# From libfprint tests
|
# From libfprint tests
|
||||||
def send_retry(self, retry_error=1):
|
def send_retry(self, retry_error=1):
|
||||||
# The default (1) is too-short
|
# The default (1) is too-short
|
||||||
|
|||||||
Reference in New Issue
Block a user