Skip to main content

Pytest plugin to operate with objects generated by Simbind tool.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytest-simbind-0.1.2.tar.gz (43.6 kB view details)

Uploaded Source

Built Distribution

pytest_simbind-0.1.2-py3-none-any.whl (34.0 kB view details)

Uploaded Python 3

File details

Details for the file pytest-simbind-0.1.2.tar.gz.

File metadata

  • Download URL: pytest-simbind-0.1.2.tar.gz
  • Upload date:
  • Size: 43.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for pytest-simbind-0.1.2.tar.gz
Algorithm Hash digest
SHA256 801f9047e6053ca62c3e509d66182b26d5c26c2c85759319b2001e4eadeeaaab
MD5 7848159578dbd8f3f7e1b43c632b7733
BLAKE2b-256 ba213e0e711155130481ac156d23cfe6a97db751efa436f2f8b6f39120e8780b

See more details on using hashes here.

File details

Details for the file pytest_simbind-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: pytest_simbind-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 34.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for pytest_simbind-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9554051cbf4bbd2e56922e7b2a06417584b8b2229acc00d63a824504211c7962
MD5 846fe4a32c7eac9db5c89a88a751fa90
BLAKE2b-256 577002bfa3f2f229b3db03bcd41d8b54080903d2bd6c6eadae8f044d8726cb16

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page