# Path: tests/test_snoop.py
# def sample_traceback():
#     raw = u''.join(
#         traceback.format_exception(*sys.exc_info())
#     ).splitlines(True)
#     tb = u''.join(
#         line for line in raw
#         if not line.strip().startswith("File")
#         if not line.strip() == "raise value"  # part of six.reraise
#     )
#     sys.stderr.write(tb)


from tests.test_snoop import sample_traceback


@snoop
def main():
    x = 1
    y = 2
    try:
        pp.deep(lambda: x + y + bad() + 2)
    except:

# Path: tests/test_snoop.py
# def sample_traceback():
#     raw = u''.join(
#         traceback.format_exception(*sys.exc_info())
#     ).splitlines(True)
#     tb = u''.join(
#         line for line in raw
#         if not line.strip().startswith("File")
#         if not line.strip() == "raise value"  # part of six.reraise
#     )
#     sys.stderr.write(tb)


# Path: tests/samples/pp_exception.py
from tests.test_snoop import sample_traceback



@snoop
def main():
    x = 1
    y = 2
    try:
        pp.deep(lambda: x + y + bad() + 2)
    except:

        sample_traceback()