Skip to main content

pytest-simbind

pytest-simbind is pytest plugin that facilitates SiL testing of Simbind objects. For a ready-to-use service solution refer to Simtest.

Specially, pytest-simbind allows to overcome main limitation of Simbind generated objects:

Due to the nature of binding technology you can instantiate Model class only once within a single process, all consequent instances will have the same state(time, input, and output props) as the first instance. If you need to instantiate multiple objects we recommend doing it in separate processes.

In the nutshell, pytest-simbind allows running each simbind marked test in new process:

import pytest, pytest_simbind

from model import Model


@pytest_simbind.fixture
def model():
    return Model()


@pytest.mark.simbind
def test_something(model: Model):
    ...

Notice @pytest_simbind.fixture and @pytest.mark.simbind:

  • @pytest_simbind.fixture helps pytest to keep track on Simbind fixture lifecycle and is mandatory if you need to use plugin's API.
  • @pytest.mark.simbind signifies pytest to run specified test in separate process.

Installation

To install pytest-simbind run:

$ pip install pytest-simbind

Requirements

You will need Python 3.10+ to run plugin. Additionally, plugin inherits some requirements from Simbind generated objects: while you can test your Mock model under any operational system, SiL model requires Linux! To learn more about Mock and SiL packages structure and usage, refer to Simbind Wiki.

Using API

pytest-simbind provides asynchronous API to:

  • dynamically select and run tests
  • collect Simbind model's data, test logs and fail reports.

For more information and examples please refer to Wiki. Simtest can also be used as an example and source of code snippets on how to interact with the plugin's API.

Metadata

Release files for pytest-simbind 0.1.2

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-simbind 0.1.2
File Size Uploaded
pytest-simbind-0.1.2.tar.gz 43.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pytest-simbind 0.1.2
File Interpreter ABI Platform
pytest_simbind-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 77.6 kB

Release files / pytest-simbind-0.1.2.tar.gz

Download URL pytest-simbind-0.1.2.tar.gz
Size 43.6 kB
Tags Source
SHA-256 checksum
How to use checksums
801f9047e6053ca62c3e509d66182b26d5c26c2c85759319b2001e4eadeeaaab
BLAKE2b-256 checksum
How to use checksums
ba213e0e711155130481ac156d23cfe6a97db751efa436f2f8b6f39120e8780b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.2

Release files / pytest_simbind-0.1.2-py3-none-any.whl

Download URL pytest_simbind-0.1.2-py3-none-any.whl
Size 34.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9554051cbf4bbd2e56922e7b2a06417584b8b2229acc00d63a824504211c7962
BLAKE2b-256 checksum
How to use checksums
577002bfa3f2f229b3db03bcd41d8b54080903d2bd6c6eadae8f044d8726cb16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.2

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

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