Passed
Push — master ( e8584f...303446 )
by Emmanuel
04:55
created

package_utils_test   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 14
dl 0
loc 23
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A PackageUtilsTest.test_venv_basedir() 0 5 1
1
import os
2
import sys
3
import unittest
4
5
from distutils.sysconfig import get_config_vars
6
from stakkr import package_utils as pu
7
8
base_dir = os.path.abspath(os.path.dirname(__file__))
9
sys.path.insert(0, base_dir + '/../')
10
11
12
# https://docs.python.org/3/library/unittest.html#assert-methods
13
class PackageUtilsTest(unittest.TestCase):
14
    def test_venv_basedir(self):
15
        """Make sure, even in another directory, the venv base dir is correct"""
16
        venv_base = pu.get_venv_basedir()
17
18
        self.assertEqual(os.path.abspath(get_config_vars()['exec_prefix'] + '/../'), venv_base)
19
20
21
if __name__ == "__main__":
22
    unittest.main()
23