Total Complexity | 2 |
Total Lines | 10 |
Duplicated Lines | 0 % |
1 | import os |
||
7 | class MakeTempTest(unittest.TestCase): |
||
|
|||
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: |
||
15 | self.assertTrue(os.path.isfile(temporary)) |
||
16 | self.assertFalse(os.path.isfile(temporary)) |
||
17 |