Exemplo n.º 1
0
    def test_formatting(self):
        fmt = 'The %r jumped %x over the %s'
        args = ['frog', 'foo', 'elephant']

        res = list(safeify_format(fmt, args))
        self.assertListEqual(
            [x.strip('u') for x in res],
            ["'frog'", 'foo', 'elephant'],
        )
Exemplo n.º 2
0
    def test_formatting(self):
        fmt = 'The %r jumped %x over the %s'
        args = ['frog', 'foo', 'elephant']

        res = list(safeify_format(fmt, args))
        self.assertListEqual(
            [x.strip('u') for x in res],
            ["'frog'", 'foo', 'elephant'],
        )
Exemplo n.º 3
0
    def test_formatting(self):
        fmt = 'The %r jumped over the %s'
        args = ['frog', 'elephant']

        res = list(log.safeify_format(fmt, *args))
        self.assertListEqual(res, ["'frog'", 'elephant'])
Exemplo n.º 4
0
    def test_formatting(self):
        fmt = "The %r jumped over the %s"
        args = ["frog", "elephant"]

        res = list(log.safeify_format(fmt, *args))
        self.assertListEqual(res, ["'frog'", "elephant"])
Exemplo n.º 5
0
    def test_formatting(self):
        fmt = 'The %r jumped over the %s'
        args = ['frog', 'elephant']

        res = list(log.safeify_format(fmt, *args))
        self.assertListEqual(res, ["'frog'", 'elephant'])
Exemplo n.º 6
0
def test_safe_format():
    fmt = 'The %r jumped %x over the %s'
    args = ['frog', 'foo', 'elephant']

    res = list(safeify_format(fmt, args))
    assert [x.strip('u') for x in res] == ["'frog'", 'foo', 'elephant']
Exemplo n.º 7
0
    def test_formatting(self):
        fmt = "The %r jumped over the %s"
        args = ["frog", "elephant"]

        res = list(log.safeify_format(fmt, *args))
        self.assertListEqual(res, ["'frog'", "elephant"])
Exemplo n.º 8
0
def test_safe_format():
    fmt = 'The %r jumped %x over the %s'
    args = ['frog', 'foo', 'elephant']

    res = list(safeify_format(fmt, args))
    assert [x.strip('u') for x in res] == ["'frog'", 'foo', 'elephant']