Exemplo n.º 1
0
def test_pretty_print_value_int():
    v = 5
    assert pp.format_value(v) == '5'
    config = TestConfig()
    pp.pretty_print_value(v, "+", config)
    text = config.out.getvalue()
    print("'%s'" % text)
    assert "+5" in text
    # path is only used for dispatching to special formatters
    assert "dummypath" not in text
Exemplo n.º 2
0
def test_pretty_print_value_int():
    v = 5
    assert pp.format_value(v) == '5'
    io = StringIO()
    pp.pretty_print_value(v, "+", io)
    text = io.getvalue()
    print("'%s'" % text)
    assert "+5" in text
    # path is only used for dispatching to special formatters
    assert "dummypath" not in text
Exemplo n.º 3
0
def test_pretty_print_value_int():
    v = 5
    assert pp.format_value(v) == '5'
    io = StringIO()
    pp.pretty_print_value(v, "+", io)
    text = io.getvalue()
    print("'%s'" % text)
    assert "+5" in text
    # path is only used for dispatching to special formatters
    assert "dummypath" not in text
Exemplo n.º 4
0
def test_format_value_str():
    assert pp.format_value("xyz") == "xyz"
Exemplo n.º 5
0
def test_format_value_int():
    assert pp.format_value(5) == "5"
Exemplo n.º 6
0
def test_format_value_str():
    assert pp.format_value("xyz") == "xyz"
Exemplo n.º 7
0
def test_format_value_int():
    assert pp.format_value(5) == "5"