PEP8 and updated docu strings.
parent
3721b19a61
commit
1e9f3a802d
|
@ -18,11 +18,14 @@ sys.path.insert(0, '..')
|
|||
import sample
|
||||
from pyassimp import errors
|
||||
|
||||
# paths to be walkd recursively
|
||||
basepaths = [os.path.join('..','..','..','test','models'), os.path.join('..','..','..','test','models-nonbsd')]
|
||||
# Paths to model files.
|
||||
basepaths = [os.path.join('..', '..', '..', 'test', 'models'),
|
||||
os.path.join('..', '..', '..', 'test', 'models-nonbsd')]
|
||||
|
||||
# Valid extensions for 3D model files.
|
||||
extensions = ['.3ds', '.x', '.lwo', '.obj', '.md5mesh', '.dxf', '.ply', '.stl',
|
||||
'.dae', '.md5anim', '.lws', '.irrmesh', '.nff', '.off', '.blend']
|
||||
|
||||
# file extensions to be considered
|
||||
extensions = ['.3ds','.x','.lwo','.obj','.md5mesh','.dxf','.ply','.stl','.dae','.md5anim','.lws','.irrmesh','.nff','.off','.blend']
|
||||
|
||||
def run_tests():
|
||||
ok, err = 0, 0
|
||||
|
@ -36,17 +39,15 @@ def run_tests():
|
|||
sample.main(os.path.join(root, afile))
|
||||
ok += 1
|
||||
except errors.AssimpError as error:
|
||||
# assimp error is fine, this is a controlled case
|
||||
# Assimp error is fine; this is a controlled case.
|
||||
print(error)
|
||||
err += 1
|
||||
except Exception:
|
||||
print("Error encountered while loading <%s>"%os.path.join(root,afile))
|
||||
print('** Loaded %s models, got controlled errors for %s files' % (ok,err))
|
||||
print("Error encountered while loading <%s>"
|
||||
% os.path.join(root, afile))
|
||||
print('** Loaded %s models, got controlled errors for %s files'
|
||||
% (ok, err))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
run_tests()
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue