Example #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
Example #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
Example #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
Example #4
0
def test_format_value_str():
    assert pp.format_value("xyz") == "xyz"
Example #5
0
def test_format_value_int():
    assert pp.format_value(5) == "5"
Example #6
0
def test_format_value_str():
    assert pp.format_value("xyz") == "xyz"
Example #7
0
def test_format_value_int():
    assert pp.format_value(5) == "5"