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. |
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) |
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 |
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: |