Skip to content

Commit de8a585

Browse files
committed
add assertion that all expected axes were tested
1 parent 873304f commit de8a585

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/test_instanceworker.py

+6
Original file line numberDiff line numberDiff line change
@@ -812,22 +812,28 @@ def test_instanceworker_instantiate_ttfont_and_gen_restricted_and_unrestricted_s
812812
assert "CRSV" in axis_tags
813813

814814
# get the axis data to confirm that we have a proper restricted axis range
815+
tested_axes = []
815816
for axis in iw.ttfont["fvar"].axes:
816817
# full range vs. original
817818
if axis.axisTag == "MONO":
818819
assert axis.minValue == 0.0
819820
assert axis.maxValue == 1.0
820821
assert axis.defaultValue == 0.0
822+
tested_axes.append("MONO")
821823
# restricted range vs. original
822824
if axis.axisTag == "wght":
823825
assert axis.minValue == 200.0
824826
assert axis.maxValue == 400.0
825827
assert axis.defaultValue == 300.0
828+
tested_axes.append("wght")
826829
# restricted range vs. original
827830
if axis.axisTag == "CRSV":
828831
assert axis.minValue == 0.0
829832
assert axis.maxValue == 0.5
830833
assert axis.defaultValue == 0.5
834+
tested_axes.append("CRSV")
835+
836+
assert tested_axes == ["MONO", "wght", "CRSV"]
831837

832838

833839
def test_instanceworker_instantiate_ttfont_raises_valueerror_on_invalid_data(tmpdir):

0 commit comments

Comments
 (0)