Configuration Values
maelstrom-pytest supports the following configuration values:
| Value | Short Option | Type | Description | Default |
|---|---|---|---|---|
cache-size | string | target cache disk space usage | "1 GB" | |
inline-limit | string | maximum amount of captured standard output error | "1 MB" | |
slots | number | job slots available | 1 per CPU | |
container-image-depot-root | string | container images cache directory | $XDG_CACHE_HOME/maelstrom/containers | |
accept-invalid-remote-container-tls-certs | boolean | allow invalid container registry certificates | false | |
broker | -b | string | address of broker | standalone mode |
log-level | -L | string | minimum log level | "info" |
quiet | boolean | don’t output per-test information | false | |
ui | string | UI style to use | "auto" | |
repeat | -r | number | how many times to run each test | 1 |
timeout | -t | string | override timeout value tests | don’t override |
collect-from-module | string | collect tests from the specified module | don’t override | |
extra-pytest-args | list | pass arbitrary arguments to pytest | no args | |
extra-pytest-collect-args | list | pass arbitrary arguments to pytest when collecting | no args | |
extra-pytest-test-args | list | pass arbitrary arguments to pytest when running a test | no args | |
stop-after | -s | number | stop after given number of failures | never stop |
cache-size
This is a local-worker setting, common to all clients. See here for details.
inline-limit
This is a local-worker setting, common to all clients. See here for details.
slots
This is a local-worker setting, common to all clients. See here for details.
container-image-depot-root
This is a container-image setting, common to all clients. See here for details.
accept-invalid-remote-container-tls-certs
This is a container-image setting, common to all clients. See here for details.
broker
The broker configuration value specifies the socket address of the broker.
This configuration value is optional. If not provided, maelstrom-pytest will run in standalone
mode.
Here are some example value socket addresses:
broker.example.org:1234192.0.2.3:1234[2001:db8::3]:1234
log-level
This is a setting common to all Maelstrom programs. See here for details.
maelstrom-pytest always prints log
messages to stdout.
quiet
The quiet configuration value, if set to true, causes maelstrom-pytest to be more more succinct
with its output. If maelstrom-pytest
is outputting to a terminal, it will display a single-line progress bar
indicating all test state, then print a summary at the end. If not outputting
to a terminal, it will only print a summary at the end.
ui
The ui configuration value controls the UI style used. It must be one of
auto, fancy, quiet, or simple. The default value is auto.
| Style | Description |
|---|---|
simple | This is our original UI. It prints one line per test result (unless quiet is true), and will display some progress bars if standard output is a TTY. |
fancy | This is our new UI. It has a rich TTY experience with a lot of status updates. It is incompatible with quiet or with non-TTY standard output. |
quiet | Minimal UI with only a single progress bar |
auto | Will choose fancy if standard output is a TTY and quiet isn’t true. Otherwise, it will choose simple. |
repeat
The repeat configuration value specifies how many times each test will be
run. It must be a nonnegative integer. On the command line, --loop can be
used as an alias for --repeat.
timeout
The optional timeout configuration value provides the
timeout value to use for all tests. This will override
any value set in maelstrom-pytest.toml.
collect-from-module
Collect tests from the provided module instead of using pytest’s default
collection algorithm. This will pass the provided module to pytest along with
the --pyargs flag.
extra-pytest-args
This allows passing of arbitrary command-line arguments to pytest when collecting tests and running
a test. These arguments are added in to both extra-pytest-collect-args and
extra-pytest-test-args at the beginning. See those individual configuration values for details.
extra-pytest-collect-args
This allows passing of arbitrary command-line arguments to pytest when collecting tests. See pytest --help for what arguments are accepted normally. Since these arguments are passed directly and not
interpreted, this can be used to interact with arbitrary pytest plugins.
These arguments are added after --co and --pyargs.
extra-pytest-test-args
This allows passing of arbitrary command-line arguments to pytest when running a test. See pytest --help for what arguments are accepted normally. Since these arguments are passed directly and not
interpreted, this can be used to interact with arbitrary pytest plugins.
These arguments are added after the --verbose but before we pass the nodeid of which test to
run. It could be possible to use these flags to somehow not run the test maelstrom-pytest was
intending to, producing confusing results.
When provided on the command-line these arguments are positional and come after any other arguments.
They must always be preceded by -- like as follows:
maelstrom-pytest -- -n1
stop-after
This optional configuration value if provided gives a limit on the number of failure to tolerate. If
the limit is reached, cargo-maelstrom exits prematurely.