tests/misc.py

changeset 145
fde18c4d6784
parent 105
43c367c8895b
--- a/tests/misc.py	Fri Sep 18 21:57:36 2020 +0300
+++ b/tests/misc.py	Fri Sep 18 23:51:45 2020 +0300
@@ -14,7 +14,7 @@
     from collections import defaultdict
     bad_colours = defaultdict(lambda: {'count': 0, 'first-occurrence': None})
     for element in model.body:
-        if hasattr(element, 'colour') and not element.colour.is_valid:
+        if hasattr(element, 'colour') and not model.context.is_valid_colour(element.colour):
             bad_colours[element.colour.index]['count'] += 1
             if not bad_colours[element.colour.index]['first-occurrence']:
                 bad_colours[element.colour.index]['first-occurrence'] = element

mercurial