ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/test/py_tests/test_cnt.py
(Generate patch)

Comparing ray/test/py_tests/test_cnt.py (file contents):
Revision 1.1 by schorsch, Sun Dec 7 20:40:51 2003 UTC vs.
Revision 1.2 by schorsch, Thu Mar 10 01:49:56 2016 UTC

# Line 8 | Line 8 | import unittest
8   from unit_tools import support
9   from unit_tools import lcompare
10  
11 + _bindir = None
12 +
13   class CntTestCase(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_1(self):
24                  cmd = 'cnt 5'
# Line 47 | Line 51 | class CntTestCase(unittest.TestCase):
51                  except lcompare.error, e: self.fail(str(e))
52  
53  
54 < def main():
54 > def main(bindir=None):
55 >        global _bindir
56 >        _bindir=bindir
57          support.run_case(CntTestCase)
58  
59   if __name__ == '__main__':

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines