Back to index

radiance  4R0+20100331
Public Member Functions | Public Attributes
py_tests.test_cnt.CntTestCase Class Reference

List of all members.

Public Member Functions

def setUp
def tearDown
def test_1
def test_2
def test_3

Public Attributes

 oldpath

Detailed Description

Definition at line 11 of file test_cnt.py.


Member Function Documentation

Definition at line 12 of file test_cnt.py.

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

Definition at line 16 of file test_cnt.py.

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

Definition at line 19 of file test_cnt.py.

00019 
00020        def test_1(self):
00021               cmd = 'cnt 5'
00022               res0 = os.popen(cmd).read()
00023               res = map(string.strip,string.split(res0, '\n'))
00024               exp = [0, 1, 2, 3, 4, '']
00025               try: lcompare.lcompare(res, exp)
00026               except lcompare.error, e: self.fail(str(e))

Definition at line 27 of file test_cnt.py.

00027 
00028        def test_2(self):
00029               cmd = 'cnt 3 2'
00030               res0 = os.popen(cmd).read()
00031               res = map(string.split,string.split(res0, '\n'))
00032               exp = [[0,0], [0,1], [1,0], [1,1], [2,0], [2,1], []]
00033               try: lcompare.llcompare(res, exp)
00034               except lcompare.error, e: self.fail(str(e))

Definition at line 35 of file test_cnt.py.

00035 
00036        def test_3(self):
00037               cmd = 'cnt 3 2 3'
00038               res0 = os.popen(cmd).read()
00039               res = map(string.split,string.split(res0, '\n'))
00040               exp = [[0,0,0],[0,0,1],[0,0,2],
00041                      [0,1,0],[0,1,1],[0,1,2],
00042                      [1,0,0],[1,0,1],[1,0,2],
00043                      [1,1,0],[1,1,1],[1,1,2],
00044                      [2,0,0],[2,0,1],[2,0,2],
00045                      [2,1,0],[2,1,1],[2,1,2],
00046                      []]
00047               try: lcompare.llcompare(res, exp)
00048               except lcompare.error, e: self.fail(str(e))
00049 


Member Data Documentation

Definition at line 13 of file test_cnt.py.


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