blob: ccf1a76f833b485ede7132315946ef6919ae381f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
import os
import shutil
import tempfile
try:
import unittest2 as unittest
except ImportError:
import unittest
class BaseLeapTest(unittest.TestCase):
__name__ = "leap_test"
@classmethod
def setUpClass(cls):
cls.old_path = os.environ['PATH']
cls.tempdir = tempfile.mkdtemp()
bin_tdir = os.path.join(
cls.tempdir,
'bin')
os.environ["PATH"] = bin_tdir
@classmethod
def tearDownClass(cls):
os.environ["PATH"] = cls.old_path
shutil.rmtree(cls.tempdir)
def setUp(self):
raise NotImplementedError("abstract base class")
def tearDown(self):
raise NotImplementedError("abstract base class")
if __name__ == "__main__":
unittest.main()
|