Example #1
0
    def test_ok(self):
        args = (
            (((255, 255, 255), 'white'), ['-c', 'black']),

            (((0, 253, 114), None), ['--color', '#ff028d'])
        )

        for result, cli in args:
            self.assertEqual(result, get_options(cli).color2)
Example #2
0
    def test_ok(self):
        args = (
            ((690, 420), ['-r', '690x420']),
            ((690, 420), ['-r', '690:420']),
            ((690, 420), ['--resolution', '690x420']),
            ((690, 420), ['--resolution', '690:420'])
        )

        for result, cli in args:
            self.assertEqual(result, get_options(cli).resolution)
Example #3
0
    def test_ok(self):
        args = (
            (((0, 0, 0), 'black'), ['-c', 'black']),
            (((0, 0, 0), 'black'), ['-c', '000']),
            (((0, 0, 0), 'black'), ['-c', '000000']),
            (((0, 0, 0), 'black'), ['-c', '#000000']),
            (((0, 0, 0), 'black'), ['--color', 'black']),
            (((0, 0, 0), 'black'), ['--color', '000']),
            (((0, 0, 0), 'black'), ['--color', '000000']),
            (((0, 0, 0), 'black'), ['--color', '#000000']),

            (((255, 2, 141), 'hotpink'), ['--color', '#ff028d'])
        )

        for result, cli in args:
            self.assertEqual(result, get_options(cli).color)
Example #4
0
    def test_default(self):
        options = get_options([])

        self.assertEqual(((255, 2, 141), 'hotpink'), options.color)
Example #5
0
    def test_default(self):
        options = get_options([])

        self.assertEqual((1920, 1080), options.resolution)
Example #6
0
    def test_default(self):
        options = get_options([])

        self.assertEqual(((0, 253, 114), None), options.color2)