A plugin to pytest stoq
Project description
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file pytest-stoq-0.4.1.tar.gz
.
File metadata
- Download URL: pytest-stoq-0.4.1.tar.gz
- Upload date:
- Size: 15.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.35.0 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7cc515462a6c1239f882d0d0587e473776b613306618683963cdc7f5f2fa49d8 |
|
MD5 | 29787d4f9a8f18708d3d89c2492d4c63 |
|
BLAKE2b-256 | 6e97910be901eca0b5f2628d04acc3dbc858c291bb4b2cf7b06f6ca0e676fe83 |