Пример #1
0
def pretty_print(text):
    cmd = "{prg} {options}".format(prg=cfg.TIDY, options=OPTIONS)
    return process.get_cmd_output_input_from_stdin(cmd, text)
Пример #2
0
def test_get_cmd_output_input_from_stdin():
    res = process.get_cmd_output_input_from_stdin("grep es", "test")
    assert res == 'test\n'
    res = process.get_cmd_output_input_from_stdin("wc -w", "a b c d e")
    assert res == '5\n'
Пример #3
0
def test_get_cmd_output_input_from_stdin():
    res = process.get_cmd_output_input_from_stdin("grep es", "test")
    assert res == 'test\n'
    res = process.get_cmd_output_input_from_stdin("wc -w", "a b c d e")
    assert res == '5\n'
Пример #4
0
def pretty_print(text):
    cmd = "{prg} {options}".format(prg=cfg.TIDY, options=OPTIONS)
    return process.get_cmd_output_input_from_stdin(cmd, text)