Registry / testing / pyats-results

pyats-results

JSON →
library26.5pypypiunverified

pyATS Results is a core component of the Cisco pyATS framework, providing an object-oriented API for representing and managing test execution results such as Pass, Fail, Warn, Error, and others. It ensures consistent handling and reporting across various test scenarios within the pyATS ecosystem. As of version 26.3, it is actively maintained with frequent releases aligned with the broader pyATS framework, typically on a monthly cadence.

pip install pyats-results
INSTALL
IMPORT
SIG · PYATS-RESULTS
P
pyats-results
testingpythonv26.5
Install
6.8s avg
Import
Disk
141MB
Pass rate
7/ 10
Env Coverage7 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v26.5 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✓ —
✓ 7.23s
py 3.11
✕ build_error
✓ 6.5s
py 3.12
✕ build_error
✓ 5.58s
py 3.13
✕ build_error
✓ 5.7s
py 3.9
✓ —
✓ 9.2s
141MB installed
● package 141MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Result
from pyats.results import Result
from pyats.results import Result

This quickstart demonstrates how to instantiate and use `pyats.results` objects to represent different test outcomes. It shows creating specific result types like `Pass` and `Fail`, as well as using the base `Result` class to explicitly set a state like 'Blocked' or 'Warning'.

from pyats.results import Pass, Fail, Result def run_my_test_example(): # Example 1: Using specific result classes test_case_status = True if test_case_status: result1 = Pass('Scenario A completed successfully.') else: result1 = Fail('Scenario A encountered a critical error.') # Example 2: Using the base Result class and setting its state result2 = Result() result2.state = 'Blocked' result2.message = 'Scenario B was blocked by a previous failure.' # Example 3: Instantiating a warning result3 = Result() result3.state = 'Warning' result3.message = 'Scenario C completed with minor warnings.' print(f"Test 1: {result1.state} - {result1.message}") print(f"Test 2: {result2.state} - {result2.message}") print(f"Test 3: {result3.state} - {result3.message}") # Assertions for quickstart validation assert result1.state == 'Passed' assert result2.state == 'Blocked' assert result3.state == 'Warning' if __name__ == "__main__": run_my_test_example()
Debug
Known issues
gotchaAll pyATS core components (e.g., `pyats`, `pyats.topology`, `pyats.results`, `pyats.aereports`) must be installed with compatible versions. Mismatched versions, especially across major releases, can lead to subtle bugs or unexpected runtime errors due to internal API changes.
fix
Always install or upgrade all `pyats` related packages together. The recommended approach is to `pip install pyats` which pulls compatible dependencies, or explicitly specify versions consistent with the official pyATS release notes.
affects: All versions
gotchaThe `state` attribute of `Result` objects is case-sensitive and expects specific string values (e.g., 'Passed', 'Failed', 'Warning', 'Aborted', 'Blocked', 'Errored', 'Skipped', 'PostProcessor'). Assigning non-standard or incorrectly cased strings can lead to issues with downstream reporting tools or integrations that rely on these predefined states.
fix
Use the dedicated result classes (`Pass`, `Fail`, `Warn`, `Error`, etc.) when possible, or ensure direct assignments to `result.state` strictly adhere to the official pyATS result state strings, including capitalization. Refer to pyATS documentation for the full list of valid states.
affects: All versions
Upgrade
Version history
26.5latest on PyPI · released May 28, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
25 hits · last 30 days
node
24
Resources
pyats-results — pip install pyats-results · libregistry