Skip to main content

Pytest-Sosu

Pytest-Sosu (pronounced Sōsu, ソース) is an unofficial Pytest plugin for running tests on Sauce Labs platforms.

Installation

You can install pytest-sosu latest version via pip:

pip install pytest-sosu

Basic Usage

Assuming you have SAUCE_USERNAME and SAUCE_ACCESS_KEY environment variables set (credentials can be obtained here), you can write a simple test:

def test_visit(sosu_webdriver):
    driver = sosu_webdriver
    driver.get("http://example.com/")
    assert driver.title == "Example Domain"

Examples

from pytest_sosu.webdriver import CapabilitiesMatrix, Browser


# running given test on multiple browsers
@pytest.mark.sosu(
    capabilities_matrix=CapabilitiesMatrix(
        browsers=[Browser("chrome"), Browser("firefox")],
    ),
)
def test_visit_many_browsers(driver):
    driver.get("http://example.com/")
    assert driver.title == "Example Domain"

# when build basename is set, tests running in given pytest session
# have a build assigned
@pytest.fixture(scope="session")
def sosu_build_basename():
    return 'my-project-name'


# alias for sosu_webdriver
@pytest.fixture
def driver(sosu_webdriver):
    yield sosu_webdriver

Metadata

Release files for pytest-sosu 0.1.6

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-sosu 0.1.6
File Size Uploaded Provenance Actions
pytest-sosu-0.1.6.tar.gz 12.0 kB Without provenance Details for pytest-sosu-0.1.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pytest-sosu 0.1.6
File Interpreter ABI Platform Actions
pytest_sosu-0.1.6-py3-none-any.whl Python 3 none any Details for pytest_sosu-0.1.6-py3-none-any.whl

Total release size: 25.2 kB

Release files / pytest-sosu-0.1.6.tar.gz

Download URL pytest-sosu-0.1.6.tar.gz
Size 12.0 kB
Tags Source
SHA-256 checksum
How to use checksums
cf25a36902654996dda186f623cce14af2154bbacbdfc3fb1d61bcfe536dad22
BLAKE2b-256 checksum
How to use checksums
20a80e631b3d9aa3798b9da38157100f751c5190c7c83f74b6443458750dabf9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.5

Release files / pytest_sosu-0.1.6-py3-none-any.whl

Download URL pytest_sosu-0.1.6-py3-none-any.whl
Size 13.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8d93b05e28676cee51f12ac2411f42b7bb198d1940b1244851760dcea259b417
BLAKE2b-256 checksum
How to use checksums
ab2c35383b8929b35e90596fae68a24297d5e31154e6cae0d2d296c2937acd72
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.5

Security for pytest-sosu 0.1.6

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.

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