def setUp(self): self.non_nested_positionals = [flags.Style.Dim, flags.Color.Red] self.first_positionals = [ flags.Style.Blink | flags.Color.Red, flags.Color.Blue, flags.Fill.Green ] self.second_positionals = [flags.Style.Underline] self.nested_positionals = [ self.first_positionals, self.second_positionals ] self.free_positional = flags.Fill.Black self.tuple_always = ("b", "c") self.dict_always = { "a": flags.Color.Blue, self.tuple_always: flags.Fill.Yellow } self.parser = parser.Parser([ self.non_nested_positionals, self.nested_positionals, self.free_positional, self.dict_always ], {"free": flags.Style.Hidden})
def setUp(self): self.positional = [ flags.Color.Red | flags.Fill.Blue, flags.Style.Invert, flags.Style.Blink ] self.codes = [flags.codify(i) for i in self.positional] self.always = {"always": flags.Color.White} self.always_code = flags.codify(self.always["always"]) self.parser = parser.Parser(self.positional, self.always)
def setUp(self): self.parser = parser.Parser(None, None)
def setUp(self): self.parser = parser.Parser([flags.Color.White], {})
def setUp(self): self.parser = parser.Parser([flags.Color.Red, flags.Fill.White], None)