1 |
+ |
from __future__ import print_function |
2 |
|
|
3 |
|
import os |
4 |
|
import math |
8 |
|
from unit_tools import support |
9 |
|
from unit_tools import lcompare |
10 |
|
|
11 |
+ |
_bindir = None |
12 |
+ |
|
13 |
|
class GenbeadsTestCase(unittest.TestCase): |
14 |
|
def setUp(self): |
15 |
< |
self.oldpath = os.environ['PATH'] |
16 |
< |
os.environ['PATH'] = os.path.abspath(support.BINDIR) |
15 |
> |
if _bindir: |
16 |
> |
self.oldpath = os.environ['PATH'] |
17 |
> |
os.environ['PATH'] = _bindir |
18 |
|
|
19 |
|
def tearDown(self): |
20 |
< |
os.environ['PATH'] = self.oldpath |
20 |
> |
if _bindir: |
21 |
> |
os.environ['PATH'] = self.oldpath |
22 |
|
|
23 |
|
def test_genbeads(self): |
24 |
|
cmd = 'genbeads mymat myname 0 0 0 1 1 1 2 0 0 0 2 0 .1 .4' |
40 |
|
self.fail('%s [%s]' % (str(e),cmd)) |
41 |
|
|
42 |
|
|
43 |
< |
def main(): |
43 |
> |
def main(bindir=None): |
44 |
> |
global _bindir |
45 |
> |
_bindir=bindir |
46 |
|
support.run_case(GenbeadsTestCase) |
47 |
|
|
48 |
|
if __name__ == '__main__': |