Skip to main content

pytest_mh - pytest multihost test framework

pytest-mh is a pytest plugin that, at a basic level, allows you to run shell commands and scripts over SSH on remote Linux or Windows hosts. You use it to execute system or application tests for your project on a remote host or hosts (or containers) while running pytest locally keeping your local machine intact.

The plugin also provides building blocks that can be used to setup and teardown your tests, perform automatic clean up of all changes done on the remote host, and build a flexible and unified high-level API to manipulate the hosts from your tests.

Documentation

See the full documentation here: https://pytest-mh.readthedocs.io.

Example usage

The following snippet was taken from the SSSD project.

    @pytest.mark.topology(KnownTopology.AD)
    @pytest.mark.topology(KnownTopology.LDAP)
    @pytest.mark.topology(KnownTopology.IPA)
    @pytest.mark.topology(KnownTopology.Samba)
    def test__id(client: Client, provider: GenericProvider):
        u = provider.user("tuser").add()
        provider.group("tgroup_1").add().add_member(u)
        provider.group("tgroup_2").add().add_member(u)

        client.sssd.start()
        result = client.tools.id("tuser")

        assert result is not None
        assert result.user.name == "tuser"
        assert result.memberof(["tgroup_1", "tgroup_2"])

Metadata

Release files for pytest-mh 1.0.31

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-mh 1.0.31
File Size Uploaded Provenance Actions
pytest_mh-1.0.31.tar.gz 88.2 kB Without provenance Details for pytest_mh-1.0.31.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pytest-mh 1.0.31
File Interpreter ABI Platform Actions
pytest_mh-1.0.31-py3-none-any.whl Python 3 none any Details for pytest_mh-1.0.31-py3-none-any.whl

Total release size: 192.8 kB

Release files / pytest_mh-1.0.31.tar.gz

Download URL pytest_mh-1.0.31.tar.gz
Size 88.2 kB
Tags Source
SHA-256 checksum
How to use checksums
454e32e13f76ac88bee8a24d14288de21c9aeab0e55ce3598c0db18c3463e469
BLAKE2b-256 checksum
How to use checksums
da0a63b913ad7d788a9b4c6938c2a6b9b5dbdf04622fadbcfef28b0fb71b0292
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / pytest_mh-1.0.31-py3-none-any.whl

Download URL pytest_mh-1.0.31-py3-none-any.whl
Size 104.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cf2ccdec1ff3947a77d49acc87ec627e2fcc14f511d800f5f9b75561a59f2197
BLAKE2b-256 checksum
How to use checksums
15be40209310e01a47615e188b8015c34760a159900160ccb110f8c0a66670e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for pytest-mh 1.0.31

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.31 This release

2 release files No provenance

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