Skip to main content

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:

$ pytest --trepan ...

Project Details

Metadata

Release files for pytest-trepan 3.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytest-trepan 3.1.0
File Size Uploaded
pytest_trepan-3.1.0.tar.gz 8.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pytest-trepan 3.1.0
File Interpreter ABI Platform
pytest_trepan-3.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 16.2 kB

Release files / pytest_trepan-3.1.0.tar.gz

Download URL pytest_trepan-3.1.0.tar.gz
Size 8.2 kB
Tags Source
SHA-256 checksum
How to use checksums
40756007b7fdc400b448a1c92cf20320c54a637c8511d966aeeb728aec56c12d
BLAKE2b-256 checksum
How to use checksums
cddf671f101787d54b06f95dc324436038f1b1e2e17d58ea8aece399fda0ebd8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / pytest_trepan-3.1.0-py3-none-any.whl

Download URL pytest_trepan-3.1.0-py3-none-any.whl
Size 7.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6c99cb84a0e434fc31b1e79f4dad654b7bbf7f66f9680d680ea57745ffe5b645
BLAKE2b-256 checksum
How to use checksums
4bb9db60b1069462725bd3b05fa45a321595c40c0659a99b4fd9f9b216d3e86d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

3.1.0 This release

2 release files

2.0.0

9 release files

1.0.1

6 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page