teja is a Python wrapper for testrunners like py.test but oriented towards better managing Pecan configurations.
If you need to switch from test configurations you can do that on the fly and at the same time, pass command line options to the test runner you want.
You can even store a default test configuration to load always, avoiding typing the same configuration file each time you run your tests.
Before anything you need to tell teja what is your config path to your Pecan configurations:
teja path /path/to/pecan/configs
If you do not set this, teja will complain about it.
py.test is the currently supported testrunner so you do not need anything else if it is installed. Run teja right away to run your tests:
$ teja -q
collected 38 items
38 passed in 1.30 seconds
The above is actually done by py.test. Since you didn't pass any keywords for teja configurations it assumed you are passing in py.test options.
Default Test Configuration
To set a default test configuration:
teja set-default my_config
Confirm teja configuration values
It is always important to be able to confirm the values for the tool:
$ teja values
TestRunner Configuration :
runner = pytest
config_path = /opt/project/foo/configs
default_config = my_test_config
You can access the help menu by running teja help. Watch out though, if you call teja --help you are actually calling the testrunner's help menu:
$ teja help
Teja: a Meta TestRunner that sets environments for Pecan
and runs your tests with an existing TestRunner.
teja [TestRunner options]
Load a specific Pecan config:
teja [pecan config] [TestRunner options]
runner Sets the value for TestRunner (e.g. py.test)
path Sets the path to your Pecan Configs
set-default Saves your prefered testing config file name
create-config Creates a .teja file in a provided path
values Prints the current Teja configurations