1 | import os |
||
2 | import unittest |
||
3 | |||
4 | from coalib.misc.ContextManagers import make_temp |
||
5 | |||
6 | |||
7 | class MakeTempTest(unittest.TestCase): |
||
0 ignored issues
–
show
Comprehensibility
Best Practice
introduced
by
![]() |
|||
8 | |||
9 | def test_temp_file_existence(self): |
||
10 | """ |
||
11 | Test that the temporary file created exists only within the with |
||
12 | statement context and not outside it |
||
13 | """ |
||
14 | with make_temp() as temporary: |
||
0 ignored issues
–
show
Comprehensibility
Best Practice
introduced
by
|
|||
15 | self.assertTrue(os.path.isfile(temporary)) |
||
16 | self.assertFalse(os.path.isfile(temporary)) |
||
17 |