Flask-Script commands to integrate with PyZen.
Project description
Flask-Zen is an extension to Flask that allows you to use PyZen via Flask-Script commands. Both a simple test runner command and the standard PyZen auto-runner are provided. You can install the requirements from PyPI with easy_install or pip or download them by hand.
Installation
Install the extension with one of the following commands:
$ easy_install Flask-Zen
or alternatively if you have pip installed:
$ pip install Flask-Zen
Configuration
PyZen exposes two Flask-Script commands: Test and ZenTest. To configure both:
from flaskext.script import Manager from flaskext.zen import Test, ZenTest manager = Manager(app) manager.add_command('test', Test()) manager.add_command('zen', ZenTest()) if __name__ == '__main__': manager.run()
Any of the command-line options below can be overridden using a keyword argument to the Test or ZenTest constructor:
manager.add_command('zen', ZenTest(nocolor=True, ui='none'))
Usage
The Test command will run a single test run and exit. The ZenTest command will run the normal PyZen continuous tester.
- -s, --start-dirdefault: location of manage.py
Base directory for test discovery.
- -p, --patterndefault: */tests/*.py;*/tests.py
Semicolon separated file globs to use for loading tests.
- -v, --verbositydefault: 1
Test runner verbosity.
- --nocolorflag, default: False
Disable colored output.
- -u, --uionly for ZenTest, default: autodetect
Force the use of a specific UI module. Available options are win32, osx, linux, and none.
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 Flask-Zen-0.1.tar.gz
.
File metadata
- Download URL: Flask-Zen-0.1.tar.gz
- Upload date:
- Size: 48.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc21db2412d712c7483f5ce6a327dbc40a81358243b3f4ea5834fa041ad75e12 |
|
MD5 | 2f1eda45269318b54d3da3f50d432748 |
|
BLAKE2b-256 | b05c6278f8511bbc8e84312d602a49d1892255d8751810852ffe2aadf717855e |