skip to navigation
skip to content

pytest-trepan 1.0.1

Pytest plugin for trepan debugger.

Abstract

A pytest plugin for running the trepan debugger

Using

After installing, to set a breakpoint to enter the trepan debugger:

import pytest
def test_function():
    ...
    pytest.trepan()    # get thee into the debugger!
    x = 1
    ...

The above will look like it is stopped at the pytest.trepan() call. This is most useful when this is the last statement of a scope. If you want to stop instead before x = 1 pass immediate=False or just False:

import pytest
def test_function():
    ...
    pytest.trepan(immediate=False)
    # same as py.trepan(False)
    x = 1
    ...

You can also pass as keyword arguments any parameter accepted by trepan.api.debug().

To have the debugger entered on error, use the --trepan option:

$ py.test --trepan ...

Project Details

 
File Type Py Version Uploaded on Size
pytest-trepan-1.0.1.tar.gz (md5) Source 2017-07-19 6KB
pytest_trepan-1.0.1-py2.7.egg (md5) Python Egg 2.7 2017-07-19 7KB
pytest_trepan-1.0.1-py2.py3-none-any.whl (md5) Python Wheel py2.py3 2017-07-19 5KB
pytest_trepan-1.0.1-py3.4.egg (md5) Python Egg 3.4 2017-07-19 7KB
pytest_trepan-1.0.1-py3.5.egg (md5) Python Egg 3.5 2017-07-19 7KB
pytest_trepan-1.0.1-py3.6.egg (md5) Python Egg 3.6 2017-07-19 7KB