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