Skip to main content

A plugin to pytest stoq

Project description

PyPI version Python versions CI Build

A plugin to pytest stoq.

This plugin automatically set up the stoq test environment. It also provide a range of fixtures to ease the testing of stoq-related projects.

Installation

You can install “pytest-stoq” via pip from PyPI:

$ pip install pytest-stoq

Command-line options

  • --plugin-cls: the plugin class path to be installed. Useful for testing stoq plugin projects.

  • --quick: setup stoq using the quick strategy.

  • --skip-env-setup: pytest-stoq won’t setup the database, install plugins etc. (in case you already have the test env ready).

Fixtures

The plugin provides the following fixtures:

  • store: an instance of storm’s (ORM) store used to access the database. It suffers rollback after each test case and cannot be committed, closed or rollbacked manually

  • example_creator: instance creates (inserts) database objects with example/test data

  • current_station

  • current_user

  • current_branch

  • current_till

Local Development

(optional) Setup your virtualenv using python 3.5+

Install test requirements:

$ pip install -Ur requirements-test.txt

Setup pre-commit:

$ pre-commit install

Run tests using pytest:

$ make test

License

Distributed under the terms of the GNU GPL v3.0 license, “pytest-stoq” is free and open source software

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-stoq-0.4.2.tar.gz (15.9 kB view hashes)

Uploaded Source

Supported by

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