Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

PyTest action is a test framework for Python applications and libraries.

...

PyTest

Working Folder

The working directory for the pip command line. Leave blank to default to the workspace folder.

Tests

Path the paths to files or directories containing tests to run. Run specific tests within a module by specifying its node id. One path per line.

...

If this is ticked, PyTest is installed on the agent using Pip. A new tab appears for entering Pip settings.

Using 

The Using drop down is populated by any property collector properties whose namespace matches the pattern defined by the PyTest action. The pattern for this action is ^PyTest\..*. The default property collector searches the environment path for "pytest.exe".

...

Visible only if the checkbox 'Install project in editable mode' is ticked.

The irectory directory to check out editable projects into. The default in a virtualenv is “<venv path>\src”. The default for global installs is “<current dir>\src”.

...

Select whether to prepend or append to sys.path when importing test modules. Default is to 'prepend'. [--import-mode]

Base Temporary Directory

Base The base temporary directory for this test run. Note that this directory is removed if it exists. [--basetemp]

...

If this is ticked, tests are executed even if collection errors occur. [--continue-collection-errors]


Doctests

Image RemovedImage Added

Run doctests in all python modules.

If this is ticked, doctests are run in all python (.py) modules [--doctest-modules]

...

Doctests Paths

Select whether to use PEP 517 for building source distributions or force legacy behaviourInclude doctests in files matching globbing pattern. Leave empty to default to test*.txt. One path per line. [--use-pep517 | --no-use-pep517doctest-glob]

Doctest Report Format

If this is ticked, package dependencies are not installed. The output report format for diffs on doctest failure. [--nodoctest-depsreport]

Ignore doctest import errors.

If this is ticked, isolation is disabled when building a modern source distributiondoctest import errors are ignored. [--doctest-noignore-buildimport-isolationerrors]

For a given doctest, continue to run after the first failure.

If this is ticked, build directories are not cleanedcontinue to run after the first failure for a given doctest. [--no-cleandoctest-continue-on-failure]


Logging

No Index

If this is ticked, the package index is ignored. Only look at find links URLs instead.

Index URL

Visible only if the checkbox 'No Index' is NOT ticked.

Log File

The path to the file to write the log toThe base URL of Python Package Index. Default is https://pypi.org/simple. This should point to a repository compliant with PEP 503 (the simple repository API) or a local directory laid out in the same format. [--indexlog-urlfile]

Extra Index URLs

Visible only if the checkbox 'No Index' is NOT ticked.

The extra URLs of package indexes to use in addition to --index-url. Should follow the same rules as --index-url. [--extra-index-url]

Visible only if the checkbox 'No Index' is ticked.

If a URL or path to a HTML file is specified, then it is parsed for links to archives. If a local path or file:// URL that’s a directory is specified, then the directory listing will be searched for archives. [--find-links]

Extra Arguments

Image Removed

Global Options

Log Level

Specify the amount of information to be written to the log file. [--log-level]

Log Format

Specify the format as used by the logging module. [--log-format]

Log Date Format

Specify the log date format as used by the logging module. [--log-date-format]

Number of Slowest Durations

Specify the number of slowest durations to output. Leave 0 for all. [--durations]

Show setup of fixtures while executing tests.

If this is ticked, the setup of fixtures is shown wile executing tests. [--setup-show]

Report the results of 'xfail' tests as if they were not marked.

If this is ticked, the results of 'xfail' tests are reported as if they were not marked. [--runxfail]

Extra Test Summary

Enter one or more characters which represent extra test summary info to output to log. [-r]

  • f - failed
  • E - error
  • s - skipped
  • x - xfailed
  • X - xpassed
  • p - passed
  • P - passed with output
  • a - all except passed (p) and passed with output (P)
  • A - all


Extra Arguments

Image Added

Extra Arguments

Extra arguments to be supplied to the command line. One per line.Extra global options to be supplied to the setup.py call before the install command. One per line. [--global-option]


Options

Verbosity

The amount of information detail to display in the build log. [-qqq q | -qq v | -q | -v]

Log File

The path to a verbose appending log file. [--log]

...

vv]

Remove all cache contents at start of test run.

If this is ticked, all cache contents are removed at the start of the test run.

Disable warnings.

If this is ticked, the cache is warnings are disabled. [--no-cache-dir–disable-warnings]

Cache Directory

The path to a directory to store the cache data. [--cache-dir]

Run pip in an isolated mode, ignoring environment variables and user configuration.

If this ticked, pip is run in an isolated mode, ignoring environment variables and user configuration. [--isolated]

Exists Action

Specify what to do if path already exists. [--exists-action]

...

Warning Control

This option controls how often warnings are output to stderr. Leave blank to default to one warning for each source line where it occurs. [-W]

Multiple options may be given; when a warning matches more than one option, the action for the last matching option is performed. Invalid options are ignored (though, a warning message is printed about invalid options when the first warning is issued).

The simplest form of argument is one of the following action strings:

  • ignore - Ignore all warnings
  • default - Explicitly request the default behaviour (printing each warning once per source line)
  • all - Print a warning each time it occurs (this may generate many messages if a warning is triggered repeatedly for the same source line, such as inside a loop)
  • module - Print each warning only the first time it occurs in each module
  • once - Print each warning only the first time it occurs in the program.
  • error - Raise an exception instead of printing a warning message.

The full form of argument is: action:message:category:module:line

For more information, please refer to the warnings module in the python documentation.

Fail action if any tests fail

Tick this to cause the build to fail if any tests fail.

Fail action if any tests error

Tick this to cause the build to fail if an error occurred while running any test.

Fail action if any tests are inconclusive

Tick this to cause the build to fail if any tests are inconclusive

...

.

Timeout (in seconds) 

How many seconds long to wait for the action to finish running before timing out. The default is Leaving this blank (or zero) will default to 86400 seconds (24 hours).

Treat failure as warning

Tick to continue build on failure marking the action with a warning status.

Ignore warnings

If this is ticked, any warnings logged will not mark the action with a warning status.

...