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

Comparing ray/test/run_tests.py (file contents):
Revision 1.4 by schorsch, Wed Mar 30 18:09:00 2016 UTC vs.
Revision 1.6 by schorsch, Mon Jan 8 13:38:37 2018 UTC

# Line 1 | Line 1
1   #!/usr/bin/env python
2 < # -*- coding: utf-8 -*-
2 > from __future__ import division, print_function, unicode_literals
3 >
4   ''' run_tests.py - Run Radiance test suite
5 < 2013 - 2016 Georg Mischler
5 > 2013 - 2018 Georg Mischler
6  
7   Invocation:
8    As script, call with -H for instructions.
# Line 67 | Line 68 | class RadianceTests():
68                          oldraypath = old_osenv.get('RAYPATH', '')
69                          raypathlist = oldraypath.split(os.pathsep)
70                          if self.radlib:
71 <                                for rlib in self.radlib:
71 >                                for rlib in self.radlib + ['.']:
72                                          if rlib not in raypathlist:
73                                                  raypathlist.insert(0, rlib)
74                                  os.environ['RAYPATH'] = os.pathsep.join(raypathlist)
# Line 75 | Line 76 | class RadianceTests():
76                          pyradlib = None
77                          for rp in raypathlist:
78                                  prd = os.path.join(rp, 'pyradlib')
78                                #print(prd)
79                                  if os.path.isdir(prd) or os.path.islink(prd):
80                                        #print('--- found !!!')
80                                          if rp not in sys.path:
81                                                  sys.path.insert(0, rp)
82                                          pyradlib = prd
# Line 117 | Line 116 | class RadianceTests():
116                          fulldir = os.path.join(self.testdir, dir)
117                          if not os.path.isdir(fulldir):
118                                  raise Error('No such directory: "%s"' % fulldir)
119 <                        suite = loader.discover(fulldir, 'test*.py',
119 >                        suite = loader.discover(fulldir, 'test_*.py',
120                                          top_level_dir=self.thisdir)
121                          count = suite.countTestCases()
122                          if count:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines