summaryrefslogtreecommitdiff
path: root/ick2/projectapi_tests.py
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2019-10-18 10:49:25 +0300
committerLars Wirzenius <liw@liw.fi>2019-10-18 10:49:25 +0300
commit67de4c99b46c5f77950393a0f5b88a400949c331 (patch)
tree0fcaa29580cc4cdbb69950e5a184a59360f7f7d4 /ick2/projectapi_tests.py
parent5822e79a9355970a1190194e351a4761e9db6859 (diff)
downloadick2-67de4c99b46c5f77950393a0f5b88a400949c331.tar.gz
Revert "Drop: use of old persistent state classes"
This reverts commit 8344a860d226d8a5172bcb2e9de5946717a950ca.
Diffstat (limited to 'ick2/projectapi_tests.py')
-rw-r--r--ick2/projectapi_tests.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/ick2/projectapi_tests.py b/ick2/projectapi_tests.py
index f8b3c2a..5be2a58 100644
--- a/ick2/projectapi_tests.py
+++ b/ick2/projectapi_tests.py
@@ -14,6 +14,8 @@
import os
+import shutil
+import tempfile
import unittest
@@ -23,7 +25,12 @@ import ick2
class ProjectAPITests(unittest.TestCase):
def setUp(self):
- self.state = ick2.MemoryStore()
+ self.tempdir = tempfile.mkdtemp()
+ self.statedir = os.path.join(self.tempdir, 'state/dir')
+ self.state = ick2.MemoryPersistentState()
+
+ def tearDown(self):
+ shutil.rmtree(self.tempdir)
def create_api(self):
return ick2.ProjectAPI(self.state)