@@ -100,9 +100,9 @@ def test_parameter_list__ok(self):
100100 "step" : "1" ,
101101 "odk:tick-interval" : "2" ,
102102 "odk:placeholder" : "6" ,
103- "odk:tick-labelset" : "c1" ,
104103 },
105104 ),
105+ xpq .range_itemset ("q1" , "c1" ),
106106 ],
107107 )
108108
@@ -130,9 +130,9 @@ def test_parameter_list__mixed_case__ok(self):
130130 "step" : "1" ,
131131 "odk:tick-interval" : "2" ,
132132 "odk:placeholder" : "6" ,
133- "odk:tick-labelset" : "c1" ,
134133 },
135134 ),
135+ xpq .range_itemset ("q1" , "c1" ),
136136 ],
137137 )
138138
@@ -502,9 +502,7 @@ def test_tick_labelset_not_found__ok(self):
502502 """
503503 self .assertPyxformXform (
504504 md = md ,
505- xml__xpath_match = [
506- xpq .body_range ("q1" , {"odk:tick-labelset" : "c1" }),
507- ],
505+ xml__xpath_match = [xpq .body_range ("q1" ), xpq .range_itemset ("q1" , "c1" )],
508506 )
509507
510508 def test_tick_labelset_empty__error (self ):
@@ -562,9 +560,8 @@ def test_tick_labelset_no_ticks_too_many_choices__ok(self):
562560 self .assertPyxformXform (
563561 md = md ,
564562 xml__xpath_match = [
565- xpq .body_range (
566- "q1" , {"odk:tick-labelset" : "c1" , "appearance" : "no-ticks" }
567- ),
563+ xpq .body_range ("q1" , {"appearance" : "no-ticks" }),
564+ xpq .range_itemset ("q1" , "c1" ),
568565 ],
569566 )
570567
@@ -609,9 +606,8 @@ def test_tick_labelset_no_ticks_too_many_choices__allow_duplicates__ok(self):
609606 self .assertPyxformXform (
610607 md = md ,
611608 xml__xpath_match = [
612- xpq .body_range (
613- "q1" , {"odk:tick-labelset" : "c1" , "appearance" : "no-ticks" }
614- ),
609+ xpq .body_range ("q1" , {"appearance" : "no-ticks" }),
610+ xpq .range_itemset ("q1" , "c1" ),
615611 ],
616612 )
617613
@@ -673,14 +669,14 @@ def test_parameters_not_compatible_with_appearance__ok(self):
673669 params = (
674670 ("tick_interval=2" , {"odk:tick-interval" : "2" }),
675671 ("placeholder=3" , {"odk:placeholder" : "3" }),
676- ("tick_labelset=c1" , {"odk:tick-labelset" : "c1" }),
672+ ("tick_labelset=c1" , {}),
677673 )
678674 cases = ("" , "vertical" , "no-ticks" )
679675 for param , attr in params :
680- for value in cases :
681- with self .subTest ((param , attr , value )):
676+ for appearance in cases :
677+ with self .subTest ((param , attr , appearance )):
682678 self .assertPyxformXform (
683- md = md .format (param = param , value = value ),
679+ md = md .format (param = param , value = appearance ),
684680 xml__xpath_match = [
685681 xpq .body_range ("q1" , attr ),
686682 ],
@@ -726,7 +722,7 @@ def test_tick_labelset_choice_is_not_a_number__ok(self):
726722 md = md .format (value = value ),
727723 xml__xpath_match = [
728724 xpq .model_instance_bind ("q1" , "int" ),
729- xpq .body_range ("q1" , { "odk:tick-labelset" : " c1"} ),
725+ xpq .range_itemset ("q1" , " c1" ),
730726 ],
731727 )
732728
@@ -796,9 +792,9 @@ def test_tick_labelset_choice_outside_range__ok(self):
796792 "start" : "0" ,
797793 "end" : "7" ,
798794 "step" : "1" ,
799- "odk:tick-labelset" : "c1" ,
800795 },
801796 ),
797+ xpq .range_itemset ("q1" , "c1" ),
802798 ],
803799 )
804800
@@ -826,9 +822,9 @@ def test_tick_labelset_choice_outside_inverted_range__ok(self):
826822 "start" : "7" ,
827823 "end" : "3" ,
828824 "step" : "2" ,
829- "odk:tick-labelset" : "c1" ,
830825 },
831826 ),
827+ xpq .range_itemset ("q1" , "c1" ),
832828 ],
833829 )
834830
@@ -881,9 +877,9 @@ def test_tick_labelset_choice_not_a_multiple_of_step__ok(self):
881877 "start" : "0" ,
882878 "end" : "7" ,
883879 "step" : "1" ,
884- "odk:tick-labelset" : "c1" ,
885880 },
886881 ),
882+ xpq .range_itemset ("q1" , "c1" ),
887883 ],
888884 )
889885
@@ -911,9 +907,9 @@ def test_tick_labelset_choice_not_aligned_with_tick_interval__both__ok(self):
911907 "end" : "12" ,
912908 "step" : "2" ,
913909 "odk:tick-interval" : "4" ,
914- "odk:tick-labelset" : "c1" ,
915910 },
916911 ),
912+ xpq .range_itemset ("q1" , "c1" ),
917913 ],
918914 )
919915
@@ -987,9 +983,9 @@ def test_parameters__numeric__int(self):
987983 "step" : "2" ,
988984 "odk:tick-interval" : "2" ,
989985 "odk:placeholder" : "7" ,
990- "odk:tick-labelset" : "c1" ,
991986 },
992987 ),
988+ xpq .range_itemset ("q1" , "c1" ),
993989 ],
994990 )
995991
@@ -1019,8 +1015,8 @@ def test_parameters__numeric__decimal(self):
10191015 "step" : "0.5" ,
10201016 "odk:tick-interval" : "1.5" ,
10211017 "odk:placeholder" : "2.5" ,
1022- "odk:tick-labelset" : "c1" ,
10231018 },
10241019 ),
1020+ xpq .range_itemset ("q1" , "c1" ),
10251021 ],
10261022 )
0 commit comments