Skip to main content

Pytest plugin for trepan debugger.

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pytest-trepan, version 2.0.0
Filename, size File type Python version Upload date Hashes
Filename, size pytest_trepan-2.0.0-py36-none-any.whl (4.8 kB) File type Wheel Python version py36 Upload date Hashes View
Filename, size pytest_trepan-2.0.0-py34-none-any.whl (4.8 kB) File type Wheel Python version py34 Upload date Hashes View
Filename, size pytest_trepan-2.0.0-py27-none-any.whl (4.8 kB) File type Wheel Python version py27 Upload date Hashes View
Filename, size pytest_trepan-2.0.0-py3.7.egg (8.1 kB) File type Egg Python version 3.7 Upload date Hashes View
Filename, size pytest_trepan-2.0.0-py3.6.egg (8.1 kB) File type Egg Python version 3.6 Upload date Hashes View
Filename, size pytest_trepan-2.0.0-py3.5.egg (8.1 kB) File type Egg Python version 3.5 Upload date Hashes View
Filename, size pytest_trepan-2.0.0-py3.4.egg (8.2 kB) File type Egg Python version 3.4 Upload date Hashes View
Filename, size pytest_trepan-2.0.0-py2.7.egg (8.0 kB) File type Egg Python version 2.7 Upload date Hashes View
Filename, size pytest-trepan-2.0.0.tar.gz (7.2 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page