def test_compound(self): location = CompoundLocation( [FeatureLocation(0, 3), FeatureLocation(6, 9)]) for good in ["A", "AA"]: assert _is_valid_translation_length(good, location) assert not _is_valid_translation_length("AAA", location) # and with an ambiguous end, that becomes ok location = CompoundLocation( [FeatureLocation(0, 3), FeatureLocation(6, AfterPosition(11))]) assert _is_valid_translation_length("AAA", location) # and reversed ambiguous end location = CompoundLocation([ FeatureLocation(BeforePosition(0), 3, -1), FeatureLocation(6, 9, -1) ]) for good in ["A", "AA", "AAA"]: assert _is_valid_translation_length(good, location)
def test_simple(self): location = FeatureLocation(0, 9) for good in ["AA", "AAA"]: assert _is_valid_translation_length(good, location) assert not _is_valid_translation_length("AAAA", location)