# HG changeset patch # User Teemu Piippo # Date 1559059861 -10800 # Node ID 0193f8820ba8dd457658566042fb03176a060f9f # Parent a1f5c12fa45c94591150cd04663a6233a5034e23 added primitive CCW test diff -r a1f5c12fa45c -r 0193f8820ba8 tests/misc.py --- a/tests/misc.py Tue May 28 19:10:52 2019 +0300 +++ b/tests/misc.py Tue May 28 19:11:01 2019 +0300 @@ -44,6 +44,14 @@ model.body[model.header.first_occurrence['part type']], 'unofficial-type') +def primitive_ccw_test(model): + if model.header.valid \ + and model.header.filetype.endswith('Primitive') \ + and model.header.bfc != 'CERTIFY CCW': + yield error( + model.body[model.header.first_occurrence['bfc']], + 'primitive-bfc-ccw') + manifest = { 'tests': { 'colour-validity': colours_test, @@ -52,6 +60,7 @@ 'bfc-nocertify': nocertify_test, 'physical-colour': physical_colours_test, 'unofficial-type': unofficiality_test, + 'primitive-ccw': primitive_ccw_test, }, 'messages': { 'bad-colour': lambda colour_index: str.format( @@ -69,5 +78,6 @@ 'bfc-nocertify': 'all new parts must be BFC certified', 'physical-colour': 'no new physical colour parts are accepted', 'unofficial-type': 'new parts must be unofficial', + 'primitive-bfc-ccw': 'primitives must have CCW winding', }, }