File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 19
19
import logging
20
20
import tempfile
21
21
import json
22
+ import shutil
22
23
from mock import patch , MagicMock , DEFAULT
23
24
from io import StringIO
24
25
@@ -35,14 +36,16 @@ class EmptyPlatformDatabaseTests(unittest.TestCase):
35
36
"""
36
37
37
38
def setUp (self ):
38
- self .base_db_path = os .path .join (tempfile .mkdtemp (), 'base' )
39
+ self .tempd_dir = tempfile .mkdtemp ()
40
+ self .base_db_path = os .path .join (self .tempd_dir , 'base' )
39
41
self .base_db = open (self .base_db_path , 'w+b' )
40
42
self .base_db .write (b'{}' )
41
43
self .base_db .seek (0 )
42
44
self .pdb = PlatformDatabase ([self .base_db_path ])
43
45
44
46
def tearDown (self ):
45
47
self .base_db .close ()
48
+ shutil .rmtree (self .tempd_dir )
46
49
47
50
def test_broken_database_io (self ):
48
51
"""Verify that the platform database still works without a
You can’t perform that action at this time.
0 commit comments