Skip to main content

A pytest plugin to help with testing idem projects

INSTALLATION

Install with pip:

pip install pytest-idem

DEVELOPMENT INSTALLATION

Clone the pytest-idem repo and install with pip:

git clone https://gitlab.com/vmware/idem/pytest-idem.git
pip install -e pytest-idem

ACCT

Some projects, specifically need credentials from idem’s ctx generator. A ctx fixture exists, but it won’t work unless you override the acct_file and acct_profile fixtures:

@pytest.fixture
def acct_subs() -> List[str]:
    return ["azurerm", "vultr"]


@pytest.fixture
def acct_profile() -> str:
    return "test_development_idem_cloud"

Once these fixtures are overridden, the ctx fixture will become available to your test:

test_cloud_instance_present(hub, ctx):
    hub.state.cloud.present(ctx, "instance_name")

Release files for pytest-idem 4.0.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-idem 4.0.1
File Size Uploaded
pytest-idem-4.0.1.tar.gz 11.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pytest-idem 4.0.1
File Interpreter ABI Platform
pytest_idem-4.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 23.7 kB

Release files / pytest-idem-4.0.1.tar.gz

Download URL pytest-idem-4.0.1.tar.gz
Size 11.9 kB
Tags Source
SHA-256 checksum
How to use checksums
70b986cb33814b4b7cad6bf35b2f36af8499ef6c0e3ff8f3c2fb78678d86819d
BLAKE2b-256 checksum
How to use checksums
4eb2ea776225f9487c5890cb88843d42e8ee2bf2329b154a3b2b95b273de7db1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.9.6 readme-renderer/41.0 requests/2.31.0 requests-toolbelt/1.0.0 urllib3/2.0.5 tqdm/4.66.1 importlib-metadata/6.8.0 keyring/24.2.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.9.18

Release files / pytest_idem-4.0.1-py3-none-any.whl

Download URL pytest_idem-4.0.1-py3-none-any.whl
Size 11.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
18c0a3a6e4b04966f0bc964aec0b7b7b18224d6541c243ac960ebb3bfad54557
BLAKE2b-256 checksum
How to use checksums
d281667c7ef41c8664be4b62e21fffa710b985c422af136501ce5e0b1e2ea890
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.9.6 readme-renderer/41.0 requests/2.31.0 requests-toolbelt/1.0.0 urllib3/2.0.5 tqdm/4.66.1 importlib-metadata/6.8.0 keyring/24.2.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.9.18

Release history Release notifications | RSS feed

This release

4.0.1 This release

2 release files

4.0.0

2 release files

3.1.0

2 release files

3.0.0

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.1

2 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