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

Comparing ray/test/py_tests/test_ttyimage.py (file contents):
Revision 1.1 by schorsch, Sun Dec 7 20:40:51 2003 UTC vs.
Revision 1.3 by schorsch, Thu Mar 10 01:49:56 2016 UTC

# Line 8 | Line 8 | import unittest
8   from unit_tools import support
9   from unit_tools import lcompare
10  
11 + _bindir = None
12 +
13   class TtyimageTestCase(unittest.TestCase):
14          def setUp(self):
15 <                self.oldpath = os.environ['PATH']
16 <                os.environ['PATH'] = os.path.abspath(support.BINDIR)
15 >                if _bindir:
16 >                        self.oldpath = os.environ['PATH']
17 >                        os.environ['PATH'] = _bindir
18  
19          def tearDown(self):
20 <                os.environ['PATH'] = self.oldpath
20 >                if _bindir:
21 >                        os.environ['PATH'] = self.oldpath
22  
23          def test_ttyimage(self):
24 <                '''We just to point checks here'''
24 >                '''We just do a few spot checks here'''
25                  picfile = support.datafile('Earth128.pic')
26                  cmd = 'ttyimage "%s"' % picfile
27                  res0 = os.popen(cmd).read()
# Line 43 | Line 47 | class TtyimageTestCase(unittest.TestCase):
47                          self.assertEqual(result[l[0]], l[1],
48                          '%s : %s != %s [line %s]' % (cmd,result[l[0]],l[1], l[0]))
49  
50 < def main():
50 > def main(bindir=None):
51 >        global _bindir
52 >        _bindir=bindir
53          support.run_case(TtyimageTestCase)
54  
55   if __name__ == '__main__':

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)