tests/subfiles.py

changeset 147
bec55b021ae7
parent 145
fde18c4d6784
--- a/tests/subfiles.py	Thu Aug 26 19:16:25 2021 +0300
+++ b/tests/subfiles.py	Thu Aug 26 19:36:44 2021 +0300
@@ -16,7 +16,7 @@
     yield from (
         report_problem('zero-determinant', bad_object = subfile_reference)
         for subfile_reference in model.subfile_references
-        if abs(subfile_reference.matrix.determinant() - 0) < 1e-15
+        if abs(subfile_reference.matrix.determinant() - 0) < 1e-5
     )
 
 def scaling_description(scaling, axes = 'xyz'):
@@ -115,7 +115,7 @@
         ),
 )
 @problem_type('bad-subfile',
-    severity = 'hold',
+    severity = 'warning',
     message = lambda path, problem_text:
         str.format('cannot process subfile "{path}": {problem_text}',
             **locals(),
@@ -162,7 +162,7 @@
         Checks whether flat subfiles are scaled in the flat direction.
     '''
     import filecache
-    cache = filecache.SubfileCache(model.ldraw_directories)
+    cache = filecache.SubfileCache(context = model.context)
     if model.header.valid:
         cache.reference_stack.append(model.header.name)
     failed_subfiles = set()

mercurial