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

MakeTempTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %
Metric Value
dl 0
loc 10
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A test_temp_file_existence() 0 8 2
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