Skip to main content

pytest-external-blockers

A pytest outcome for tests you dont run for external/environmental reason.

examples of such reasons reasons are:

  • lack of access to a bugtracker telling you what tests apply for the current version of software under test

  • lack of access to a backend service providing essential details for the tests in question

  • issue in a bugtracker is unresolved

  • failure of the internet connection

install

$ pip install pytest-external-blockers

use

import os
import pytest
from .issues import get_tracker

pytestmark = pytest.mark.skipif(
    "BUGTRACKER" in os.environ,
    reason="no bugtracker configured")

@pytest.fixture(scope="session")
def bugtracker():
    try:
        return get_tracker():
    except Exception:
        pytest.block("bugtracker unavailiable")


@pytest.fixture(autouse=True)
def _block_unresolved(request, bugtracker):
    issue = request.node.getmarker('issue')
    if issue is not None:
        for issue_id in issue.args:
            if bugtracker.is_unresolved(issue_id)
                pytest.block(
                    "{issue_id} was not resolved".format(issue_id))

Release files for pytest-external-blockers 0.1.1

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-external-blockers 0.1.1
File Size Uploaded
pytest_external_blockers-0.1.1.tar.gz 7.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pytest-external-blockers 0.1.1
File Interpreter ABI Platform
pytest_external_blockers-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 11.3 kB

Release files / pytest_external_blockers-0.1.1.tar.gz

Download URL pytest_external_blockers-0.1.1.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d2e88ff2eaae943d1102372ba29fb8b464567d9e8bc18e89ad8785a2f0fea0de
BLAKE2b-256 checksum
How to use checksums
c39954716ce822b804a40a132bfd502f8c89b42c932a79b923c6e7f7ae8f21d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

Release files / pytest_external_blockers-0.1.1-py3-none-any.whl

Download URL pytest_external_blockers-0.1.1-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6d0ebdbf144bbc1540c5310438847ba59c940a920b3fe37149b62a70cda41bec
BLAKE2b-256 checksum
How to use checksums
c7dd4f10ef823d98beb9de1f4787a0d4514f412724e878a847691f24de117d06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

0.0.1

1 release file

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