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 1919import logging
2020import tempfile
2121import json
22+ import shutil
2223from mock import patch , MagicMock , DEFAULT
2324from io import StringIO
2425
@@ -35,14 +36,16 @@ class EmptyPlatformDatabaseTests(unittest.TestCase):
3536 """
3637
3738 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' )
3941 self .base_db = open (self .base_db_path , 'w+b' )
4042 self .base_db .write (b'{}' )
4143 self .base_db .seek (0 )
4244 self .pdb = PlatformDatabase ([self .base_db_path ])
4345
4446 def tearDown (self ):
4547 self .base_db .close ()
48+ shutil .rmtree (self .tempd_dir )
4649
4750 def test_broken_database_io (self ):
4851 """Verify that the platform database still works without a
You can’t perform that action at this time.
0 commit comments