Back to index

radiance  4R0+20100331
Public Member Functions | Public Attributes
py_tests.test_getinfo.GetinfoTestCase Class Reference

List of all members.

Public Member Functions

def setUp
def tearDown
def test_getinfo
def test_getinfo_d

Public Attributes

 oldpath

Detailed Description

Definition at line 11 of file test_getinfo.py.


Member Function Documentation

Definition at line 12 of file test_getinfo.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_getinfo.py.

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

Definition at line 20 of file test_getinfo.py.

00020 
00021        def test_getinfo(self):
00022               picfile = support.datafile('Earth128.pic')
00023               cmd = 'getinfo "%s"' % picfile
00024               res0 = os.popen(cmd).read()
00025               result = lcompare.split_headers(res0)
00026               exps = '''%s:
00027         Xim format conversion by:
00028         FORMAT=32-bit_rle_rgbe
00029         pfilt -e 2 -x 512 -y 512 -p 1 -r .67
00030         EXPOSURE=4.926198e+00
00031         normpat
00032         pfilt -1 -e .2
00033         EXPOSURE=2.000000e-01
00034         pfilt -x 128 -y 128
00035         PIXASPECT=0.500000
00036         EXPOSURE=2.571646e+00''' % picfile
00037               expect = lcompare.split_headers(exps)
00038               try: lcompare.llcompare(result, expect, ignore_empty=1)
00039               except lcompare.error, e:
00040                      self.fail('%s [%s]' % (str(e),cmd))

Definition at line 41 of file test_getinfo.py.

00041 
00042        def test_getinfo_d(self):
00043               picfile = support.datafile('Earth128.pic')
00044               cmd = 'getinfo -d "%s"' % picfile
00045               res0 = os.popen(cmd).read()
00046               result = map(string.split,string.split(res0, '\n'))
00047               exps = '''%s: -Y 128 +X 128''' % picfile
00048               expect = map(string.split, string.split(exps, '\n'))
00049               try: lcompare.llcompare(result, expect, ignore_empty=1)
00050               except lcompare.error, e:
00051                      self.fail('%s [%s]' % (str(e),cmd))


Member Data Documentation

Definition at line 13 of file test_getinfo.py.


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