Пример #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'],
        )
Пример #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'],
        )
Пример #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'])
Пример #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"])
Пример #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'])
Пример #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']
Пример #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"])
Пример #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']