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

Comparing ray/test/py_tests/test_xform.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 7 | Line 7 | import unittest
7   from unit_tools import support
8   from unit_tools import lcompare
9  
10 + _bindir = None
11 +
12   class XformTestCase(unittest.TestCase):
13          def setUp(self):
14 <                self.oldpath = os.environ['PATH']
15 <                os.environ['PATH'] = os.path.abspath(support.BINDIR)
14 >                if _bindir:
15 >                        self.oldpath = os.environ['PATH']
16 >                        os.environ['PATH'] = _bindir
17  
18          def tearDown(self):
19 <                os.environ['PATH'] = self.oldpath
19 >                if _bindir:
20 >                        os.environ['PATH'] = self.oldpath
21                  
22 <        def test_xform(self):
22 >        def test_xform_e_s(self):
23                  cmd = 'xform -e -s 3.14159 "%s"' % support.datafile('xform_1.dat')
24                  result = lcompare.split_rad(os.popen(cmd).read())
25                  expect = lcompare.split_radfile(support.datafile('xform_res1.dat'))
# Line 24 | Line 28 | class XformTestCase(unittest.TestCase):
28                          self.fail('%s [%s]' % (str(e),cmd))
29  
30  
31 <        def test_xform(self):
31 >        def test_xform_e_mx(self):
32                  cmd = 'xform -e -mx "%s"' % support.datafile('xform_2.dat')
33                  result = lcompare.split_rad(os.popen(cmd).read())
34                  expect = lcompare.split_radfile(support.datafile('xform_res2.dat'))
# Line 32 | Line 36 | class XformTestCase(unittest.TestCase):
36                  except lcompare.error, e:
37                          self.fail('%s [%s]' % (str(e),cmd))
38  
39 < def main():
39 > def main(bindir=None):
40 >        global _bindir
41 >        _bindir=bindir
42          support.run_case(XformTestCase)
43  
44   if __name__ == '__main__':

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines