コード例 #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
ファイル: test_prettyprint.py プロジェクト: jupyter/nbdime
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
ファイル: test_prettyprint.py プロジェクト: jupyter/nbdime
def test_format_value_str():
    assert pp.format_value("xyz") == "xyz"
コード例 #7
0
ファイル: test_prettyprint.py プロジェクト: jupyter/nbdime
def test_format_value_int():
    assert pp.format_value(5) == "5"