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

Comparing ray/test/py_tests/test_genbeads.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 1 | Line 1
1 + from __future__ import print_function
2  
3   import os
4   import math
# Line 7 | Line 8 | import unittest
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'
# Line 35 | Line 40 | class GenbeadsTestCase(unittest.TestCase):
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__':

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines