예제 #1
0
def test_traceback_printer_custom_colors(tb):
    tbp = TracebackPrinter(tb_base="wasabi",
                           color_error="blue",
                           color_highlight="green",
                           color_tb="yellow")
    msg = tbp("Hello world", "This is a test", tb=tb, highlight="kwargs")
    print(msg)
예제 #2
0
def test_traceback_printer_no_tb():
    tbp = TracebackPrinter(tb_base="wasabi")
    msg = tbp("Hello world", "This is a test")
    print(msg)
예제 #3
0
def test_traceback_printer_only_title(tb):
    tbp = TracebackPrinter(tb_base="wasabi")
    msg = tbp("Hello world", tb=tb)
    print(msg)
예제 #4
0
def test_traceback_printer_highlight(tb):
    tbp = TracebackPrinter(tb_base="wasabi")
    msg = tbp("Hello world", "This is a test", tb=tb, highlight="kwargs")
    print(msg)
예제 #5
0
def test_traceback_printer_custom_tb_range_start():
    tbp = TracebackPrinter(tb_range_start=-1)
    msg = tbp("Hello world", "This is a test")
    print(msg)
예제 #6
0
def test_traceback_tb_base_none(tb):
    tbp = TracebackPrinter()
    msg = tbp("Hello world", tb=tb)
    print(msg)
예제 #7
0
def test_traceback_dot_relative_path_tb_base(tb):
    tbp = TracebackPrinter(tb_base=".")
    msg = tbp("Hello world", tb=tb)
    print(msg)