Back to index

radiance  4R0+20100331
Public Member Functions | Public Attributes | Static Public Attributes
py_tests.test_ev.EvTestCase Class Reference

List of all members.

Public Member Functions

def setUp
def tearDown
def test_singleres
def test_multipleres

Public Attributes

 oldpath

Static Public Attributes

list ltest

Detailed Description

Definition at line 10 of file test_ev.py.


Member Function Documentation

Definition at line 11 of file test_ev.py.

00011 
00012        def setUp(self):
00013               self.oldpath = os.environ['PATH']
00014               os.environ['PATH'] = os.path.abspath(support.BINDIR)

Definition at line 15 of file test_ev.py.

00015 
00016        def tearDown(self):
00017               os.environ['PATH'] = self.oldpath

Definition at line 46 of file test_ev.py.

00046 
00047        def test_multipleres(self):
00048               pass # XXX implement

Definition at line 38 of file test_ev.py.

00038 
00039        def test_singleres(self):
00040               for expr, expect in self.ltest:
00041                      cmd = 'ev "%s"' % expr
00042                      result = [string.strip(os.popen(cmd).read())]
00043                      try: lcompare.lcompare(result, expect)
00044                      except lcompare.error, e:
00045                             self.fail('%s [%s]' % (str(e),cmd))


Member Data Documentation

Initial value:
[
              ['2.3 + 5 * 21.7 / 1.43', [2.3 + 5 * 21.7 / 1.43]],
              ['if(1, 1, 0)', [1]],
              ['if(0, 1, 0)', [0]],
              ['select(3, 1, 2, 3, 4, 5)', [3]],
              ['floor(5.743)', [5]],
              ['ceil(5.743)', [6]],
              ['sqrt(7.4)', [math.sqrt(7.4)]],
              ['exp(3.4)', [math.exp(3.4)]],
              ['log(2.4)', [math.log(2.4)]],
              ['log10(5.4)', [math.log10(5.4)]],
              ['sin(.51)', [math.sin(.51)]],
              ['cos(.41)', [math.cos(.41)]],
              ['tan(0.77)', [math.tan(0.77)]],
              ['asin(0.83)', [math.asin(0.83)]],
              ['acos(.94)', [math.acos(.94)]],
              ['atan(0.22)', [math.atan(0.22)]],
              ['atan2(0.72, 0.54)', [math.atan2(0.72, 0.54)]],
       ]

Definition at line 18 of file test_ev.py.

Definition at line 12 of file test_ev.py.


The documentation for this class was generated from the following file: