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:

$ pytest --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.

Source Distribution

pytest_trepan-3.1.0.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytest_trepan-3.1.0-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file pytest_trepan-3.1.0.tar.gz.

File metadata

  • Download URL: pytest_trepan-3.1.0.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pytest_trepan-3.1.0.tar.gz
Algorithm Hash digest
SHA256 40756007b7fdc400b448a1c92cf20320c54a637c8511d966aeeb728aec56c12d
MD5 108c4e328890d13b165b7a98954fc618
BLAKE2b-256 cddf671f101787d54b06f95dc324436038f1b1e2e17d58ea8aece399fda0ebd8

See more details on using hashes here.

File details

Details for the file pytest_trepan-3.1.0-py3-none-any.whl.

File metadata

  • Download URL: pytest_trepan-3.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pytest_trepan-3.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6c99cb84a0e434fc31b1e79f4dad654b7bbf7f66f9680d680ea57745ffe5b645
MD5 be8c607942615893a29f1202b08166a7
BLAKE2b-256 4bb9db60b1069462725bd3b05fa45a321595c40c0659a99b4fd9f9b216d3e86d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page