示例#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'],
        )
    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
文件: test_log.py 项目: 66ru/kombu
    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']