Exemplo n.º 1
0
 def adjustments_with_prstGeom_(self, request):
     prstGeom = a_prstGeom().with_nsdecls().with_prst("chevron").element
     adjustments = AdjustmentCollection(prstGeom)
     prstGeom_ = instance_mock(request, CT_PresetGeometry2D, name="prstGeom_")
     adjustments._prstGeom = prstGeom_
     guides = [("adj", 99900)]
     return adjustments, guides
Exemplo n.º 2
0
 def adjustments_with_prstGeom_(self, request):
     prstGeom = a_prstGeom().with_nsdecls().with_prst('chevron').element
     adjustments = AdjustmentCollection(prstGeom)
     prstGeom_ = instance_mock(
         request, CT_PresetGeometry2D, name='prstGeom_'
     )
     adjustments._prstGeom = prstGeom_
     guides = [('adj', 99900)]
     return adjustments, guides
Exemplo n.º 3
0
 def it_provides_normalized_effective_value_on_indexed_access(
         self, indexed_access_fixture_):
     prstGeom, prst, expected_values = indexed_access_fixture_
     adjustments = AdjustmentCollection(prstGeom)
     actual_values = [adjustments[idx] for idx in range(len(adjustments))]
     assert actual_values == expected_values
Exemplo n.º 4
0
 def it_should_load_adj_val_actuals_from_xml(
         self, load_adj_actuals_fixture_):
     prstGeom, expected_actuals, prstGeom_xml = load_adj_actuals_fixture_
     adjustments = AdjustmentCollection(prstGeom)._adjustments
     actual_actuals = dict([(a.name, a.actual) for a in adjustments])
     assert actual_actuals == expected_actuals
Exemplo n.º 5
0
 def it_should_load_default_adjustment_values(self, prstGeom_cases_):
     prstGeom, prst, expected = prstGeom_cases_
     adjustments = AdjustmentCollection(prstGeom)._adjustments
     actuals = tuple([(adj.name, adj.def_val) for adj in adjustments])
     assert len(adjustments) == len(expected)
     assert actuals == expected
Exemplo n.º 6
0
 def indexed_assignment_fixture_(self, request):
     prst, idx, new_val, expected = request.param
     prstGeom = a_prstGeom().with_nsdecls().with_prst(prst).element
     adjustments = AdjustmentCollection(prstGeom)
     return adjustments, idx, new_val, expected
Exemplo n.º 7
0
 def adjustments(self):
     prstGeom = a_prstGeom().with_nsdecls().with_prst('chevron').element
     return AdjustmentCollection(prstGeom)