示例#1
0
文件: test.py 项目: jrtaal/localize_m
def test_file():
    infile = StringIO(mfile)
    outfile = StringIO()

    config = dict(ask_all=False, comments=False)

    parse("testfile", infile, outfile, **config)
    eq_(prepare(outfile.getvalue()), prepare(correct_output))
示例#2
0
文件: test.py 项目: jrtaal/localize_m
def test_custom():
    infile = StringIO(mfile_custom)
    outfile = StringIO()

    config = dict(
        ask_all=False, comments=False, autoreplace_prefix="__LOCALIZE_ME_PLEASE", bundle="mybundle", table="mytable"
    )

    parse("testfile", infile, outfile, **config)
    eq_(prepare(outfile.getvalue()), prepare(correct_output_custom))
示例#3
0
文件: test.py 项目: jrtaal/localize_m
def test_file():
    infile = StringIO(mfile)
    outfile = StringIO()

    config = dict(
        ask_all=False,
        comments=False,
    )

    parse("testfile", infile, outfile, **config)
    eq_(prepare(outfile.getvalue()), prepare(correct_output))
示例#4
0
文件: test.py 项目: jrtaal/localize_m
def test_custom():
    infile = StringIO(mfile_custom)
    outfile = StringIO()

    config = dict(ask_all=False,
                  comments=False,
                  autoreplace_prefix="__LOCALIZE_ME_PLEASE",
                  bundle="mybundle",
                  table="mytable")

    parse("testfile", infile, outfile, **config)
    eq_(prepare(outfile.getvalue()), prepare(correct_output_custom))