break
def __str__(self):
- return "".join("[%s]" % x for x in self.tokens)
+ return "[%s]" % (",".join(x for x in self.tokens),)
def evaluate_conditionals(self, use):
"""
bracket_count = 0
while( open_bracket != -1 ):
bracket_count += 1
+ if bracket_count > 1:
+ raise InvalidAtom("USE Dependency with more " + \
+ "than one set of brackets: %s" % (depend,))
close_bracket = depend.find(']', open_bracket )
if close_bracket == -1:
raise InvalidAtom("USE Dependency with no closing bracket: %s" % depend )
if slot:
cpv += ":" + slot
if isinstance(use, tuple):
- for u in use:
- cpv = cpv + "[" + u + "]"
+ cpv += "[%s]" % (",".join(use),)
self.assertEqual( dep_getusedeps(
cpv ), use )
else:
( "=sys-apps/portage-2.2*:foo[doc!=]", True ),
( "=sys-apps/portage-2.2*:foo[-doc!=]", False ),
( "=sys-apps/portage-2.2*:foo[-doc=]", False ),
- ( "=sys-apps/portage-2.2*:foo[bar][-baz][doc?][-build?]", True ),
+ ( "=sys-apps/portage-2.2*:foo[bar][-baz][doc?][-build?]", False ),
( "=sys-apps/portage-2.2*:foo[bar,-baz,doc?,-build?]", True ),
( "=sys-apps/portage-2.2*:foo[bar,-baz,doc?,-build?,]", False ),
( "=sys-apps/portage-2.2*:foo[,bar,-baz,doc?,-build?]", False ),