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

Comparing ray/test/py_tests/test_histo.py (file contents):
Revision 1.2 by schorsch, Sun Dec 14 21:04:07 2003 UTC vs.
Revision 1.3 by schorsch, Thu Mar 10 01:49:56 2016 UTC

# Line 6 | Line 6 | import unittest
6   from unit_tools import support
7   from unit_tools import lcompare
8  
9 + _bindir = None
10 +
11   class HistoTestCase(unittest.TestCase):
12          def setUp(self):
13 <                self.oldpath = os.environ['PATH']
14 <                os.environ['PATH'] = os.path.abspath(support.BINDIR)
13 >                if _bindir:
14 >                        self.oldpath = os.environ['PATH']
15 >                        os.environ['PATH'] = _bindir
16  
17          def tearDown(self):
18 <                os.environ['PATH'] = self.oldpath
18 >                if _bindir:
19 >                        os.environ['PATH'] = self.oldpath
20  
21          def test_histo(self):
22                  cmd = 'histo -0.5 8.5 9 < "%s"' % support.datafile('histo.dat')
# Line 92 | Line 96 | class HistoTestCase(unittest.TestCase):
96                  except lcompare.error, e:
97                          self.fail('%s [%s]' % (str(e),cmd))
98  
99 < def main():
99 > def main(bindir=None):
100 >        global _bindir
101 >        _bindir=bindir
102          support.run_case(HistoTestCase)
103  
104   if __name__ == '__main__':

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines