Back to index

radiance  4R0+20100331
Public Member Functions | Public Attributes
py_tests.test_genbeads.GenbeadsTestCase Class Reference

List of all members.

Public Member Functions

def setUp
def tearDown
def test_genbeads

Public Attributes

 oldpath

Detailed Description

Definition at line 10 of file test_genbeads.py.


Member Function Documentation

Definition at line 11 of file test_genbeads.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_genbeads.py.

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

Definition at line 18 of file test_genbeads.py.

00018 
00019        def test_genbeads(self):
00020               cmd = 'genbeads mymat myname 0 0 0 1 1 1 2 0 0 0 2 0 .1 .4'
00021               raw = os.popen(cmd).read()
00022               result = map(string.split,string.split(raw,'\n'))
00023               expect = [['mymat', 'sphere', 'myname.0'], [0], [0],
00024               [4, 0, 0, 0, 0.1],
00025               ['mymat', 'sphere', 'myname.1'], [0], [0],
00026               [4, 0.36, 0.04, 0.104, 0.1],
00027               ['mymat', 'sphere', 'myname.2'], [0], [0],
00028               [4, 0.651440715413, 0.167781092737, 0.365893348046, 0.1],
00029               ['mymat', 'sphere', 'myname.3'], [0], [0],
00030               [4, 0.844350245496, 0.366600314978, 0.655866088042, 0.1],
00031               ['mymat', 'sphere', 'myname.4'], [0], [0],
00032               [4, 0.960791445178, 0.643185551339, 0.897901825177, 0.1],
00033               ]
00034               try: lcompare.llcompare(result, expect, ignore_empty=1)
00035               except lcompare.error, e:
00036                      self.fail('%s [%s]' % (str(e),cmd))
00037 


Member Data Documentation

Definition at line 12 of file test_genbeads.py.


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