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