aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_libmount.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/test_libmount.py b/tests/test_libmount.py
index a9a5e5b..7d02d1a 100644
--- a/tests/test_libmount.py
+++ b/tests/test_libmount.py
@@ -1,6 +1,7 @@
from concurrent.futures import ThreadPoolExecutor
from contextlib import contextmanager, suppress
from pathlib import Path
+from shutil import rmtree
from unittest import TestCase
from uuid import uuid4
@@ -8,10 +9,15 @@ from snekbox import libmount
class LibMountTests(TestCase):
- def setUp(self):
- self.temp_dir = Path("/tmp/snekbox-test")
- self.temp_dir.mkdir(exist_ok=True, parents=True)
- super().setUp()
+ temp_dir = Path("/tmp/snekbox")
+
+ @classmethod
+ def setUpClass(cls):
+ cls.temp_dir.mkdir(exist_ok=True, parents=True)
+
+ @classmethod
+ def tearDownClass(cls):
+ rmtree(cls.temp_dir, ignore_errors=True)
@contextmanager
def get_mount(self):