Skip to main content

:fire: pyrostest :fire:
=========

The most :fire: lit :fire: ros testing framework.

Pyrostest is a (more) pythonic framework for writing ros tests.

## Why pyrostest?

Writing rostests and rostunit tests is annoying. You have to write launch files
for all of your tests and then do strange things in your unittests and then
somehow the rostests and unittests will communicate. To be honest, I never could
get rostest to work. So I built something better. `pyrostest` allows you to test
your ros nodes in pure python, no need for xml files.

## Usage

Here's a minimal example of a pyrostest test. Assume you have a ros node,
`add_one` in the ros package `pkg`. The node subscribes to `input`, a Float64
message, and published to `output`, another Float64, it adds one to the input
and publishes it. This would test that functionality

```python

from pyrostest import RosTest, launch_node, mock_node
from std_msgs.msg import Float64

class TestAddOne(RosTest):
@launch_node('pkg', 'add_one')
def test_add_one(self):
with self.mock_pub('/input', Float64, queue_size=0) as p:
with self.check_topic('/output', Float64) as r:
p.send(Float64(7))
assert r.message.data == 8 # or self.assertEqual

```

This code will spin up an isolated instance of Roscore, as well as all of the
nodes needed for testing. It will then publish the float 7, and wait until the
data has been recieved, and assert about its value.



Metadata

Release files for pyrostest 0.1.13

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyrostest 0.1.13
File Size Uploaded Provenance Actions
pyrostest-0.1.13.linux-x86_64.tar.gz 12.3 kB Without provenance Details for pyrostest-0.1.13.linux-x86_64.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyrostest 0.1.13
File Interpreter ABI Platform Actions
pyrostest-0.1.13-py3-none-any.whl Python 3 none any Details for pyrostest-0.1.13-py3-none-any.whl

Total release size: 21.9 kB

Release files / pyrostest-0.1.13.linux-x86_64.tar.gz

Download URL pyrostest-0.1.13.linux-x86_64.tar.gz
Size 12.3 kB
Tags Source
SHA-256 checksum
How to use checksums
40da5dbe90092e2f594acf12ed131af09ad48aeda98fc6b1917033fa7076ec12
BLAKE2b-256 checksum
How to use checksums
602639baff85b6f9e63bc056a7441668df1905fb372e70fac846024566594e8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pyrostest-0.1.13-py3-none-any.whl

Download URL pyrostest-0.1.13-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aa370f12e520c93c2deceff1a37aff5e2a9d1e24e80ab040ea0a32da9a382a0e
BLAKE2b-256 checksum
How to use checksums
d27245d60a3d452270d10124b912b575cf761c997cee8a17eb307dbe1d1dcd67
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for pyrostest 0.1.13

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