Failed Conditions
Pull Request — master (#2076)
by Abdeali
02:11
created

tests/MakeTempTest.py (2 issues)

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
The variable unittest does not seem to be defined.
Loading history...
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
The variable temporary does not seem to be defined.
Loading history...
15
            self.assertTrue(os.path.isfile(temporary))
16
        self.assertFalse(os.path.isfile(temporary))
17