Mon, 24 Jun 2019 11:48:52 +0300
removed the typename methods
from testsuite import problem_type, report_problem import linetypes from librarystandards import library_standards @problem_type('mirrored-studs', severity = 'warning', message = lambda primitive: str.format( '"{primitive}" should not be mirrored', primitive = primitive, ) ) def mirrored_studs_test(model): for subfile_reference in model.subfile_references: # Test whether any stud subfile is mirrored. # A subfile is mirrored if its determinant is negative. if subfile_reference.subfile_path.startswith('stu') \ and subfile_reference.subfile_path != 'stud4.dat' \ and subfile_reference.matrix.determinant() < 0: yield report_problem( 'mirrored-studs', bad_object = subfile_reference, primitive = subfile_reference.subfile_path, ) manifest = {'tests': [mirrored_studs_test]}