diff --git a/README.md b/README.md index ebc7835..d450add 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,85 @@ + -## Write Tests - -Create a file anywhere in the `tests` directory. The filename should be prefixed with `test_`. Otherwise, set the glob expression using `--expresion` argument. ```sh +usage: test.py [-h] [-x] [--cache-path CACHE_PATH] [--cache-show [CACHE_SHOW]] [--cache-clear] [-k EXPRESSION] + [--lf] [--ff] [--nf] [--sw-skip] [--maxfail MAXFAIL] [--collect-only] [--ignore IGNORE] + [--ignore-glob IGNORE_GLOB] [--rootdir ROOTDIR] [--log-file LOG_FILE] + [--log-file-level {NOTSET,DEBUG,INFO,WARNING,ERROR,CRITICAL}] + [--log-file-format LOG_FILE_FORMAT] [--log-file-date-format LOG_FILE_DATE_FORMAT] + [--log-cli-level {NOTSET,DEBUG,INFO,WARNING,ERROR,CRITICAL}] [--log-cli-format LOG_CLI_FORMAT] + [--log-cli-date-format LOG_CLI_DATE_FORMAT] [--log-disable-file LOG_DISABLE_FILE] -## Run Tests +options: + -h, --help show this help message and exit + -x, --exitfirst Exit instantly on first error or failed test. + --cache-path CACHE_PATH + Path to cache file. + --cache-show [CACHE_SHOW] + Show cache contents. + --cache-clear Remove all cache contents at the start of the test run. + -k EXPRESSION, --expression EXPRESSION + Only run tests which match the given substring expression. + --lf, --last-failed Rerun only the tests that failed at the last run. + --ff, --failed-first Run all tests but run the last failures first. + --nf, --new-first Run tests from new files first. + --sw-skip, --stepwise-skip + Ignore the first failing test but stop on the next one. + --maxfail MAXFAIL Exit after the first num failures. + --collect-only, --co Only collect tests, don’t execute them. + --ignore IGNORE Ignore path during collection (multi-allowed). + --ignore-glob IGNORE_GLOB + Ignore path pattern during collection (multi-allowed). + --rootdir ROOTDIR Define root directory for tests. + --log-file LOG_FILE Path to a log file. + --log-file-level {NOTSET,DEBUG,INFO,WARNING,ERROR,CRITICAL} + Level of messages to catch/display (default depends on the root log handler). + --log-file-format LOG_FILE_FORMAT + Log format used by the logging module. + --log-file-date-format LOG_FILE_DATE_FORMAT + Log date format used by the logging module. + --log-cli-level {NOTSET,DEBUG,INFO,WARNING,ERROR,CRITICAL} + CLI logging level. + --log-cli-format LOG_CLI_FORMAT + CLI log format. + --log-cli-date-format LOG_CLI_DATE_FORMAT + CLI log date format. + --log-disable-file LOG_DISABLE_FILE + Disable log file output. -```sh -chmod +x ./test -./test +``` + +