Пример #1
0
    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})
Пример #2
0
    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)
Пример #3
0
 def setUp(self):
     self.parser = parser.Parser(None, None)
Пример #4
0
    def setUp(self):

        self.parser = parser.Parser([flags.Color.White], {})
Пример #5
0
    def setUp(self):

        self.parser = parser.Parser([flags.Color.Red, flags.Fill.White], None)