Skip to content

Commit

Permalink
Update the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
chmp committed Aug 3, 2024
1 parent cff798a commit bf01535
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 17 deletions.
16 changes: 7 additions & 9 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ There are multiple sources of global state when using pytest inside the notebook

Note that local test files are [imported by pytest][pytest-import-docs] and
fall under the same restriction as other modules. To test the most recent
version of the tests the corresponding modules need to be reloaded as well.
version of the tests, the corresponding modules need to be reloaded as well.
For example by configuring `ipytest` with
`ipytest.autoconfig(force_reload="test_*")`, when not using packages, or
`ipytest.autoconfig(force_reload="tests")`, when using packages.
Expand Down Expand Up @@ -226,7 +226,9 @@ The following settings are supported:
an `ipytest.Error` if pytest fails.
* `force_reload` (default `()`): a sequence of modules to remove from the
global module cache before executing tests. The listed modules are passed
to [`ipytest.force_reload`][ipytest.force_reload].
to [`ipytest.force_reload`][ipytest.force_reload]. For simplicity, a
single module can also be specified as a string. Glob-style wildcards are
supported.

<!-- minidoc -->

Expand Down Expand Up @@ -259,13 +261,9 @@ inside a CI/CD context, use `ipytest.autoconfig(raise_on_error=True)`.

The following parameters override the config options set with
[`ipytest.config()`][ipytest.config] or
[`ipytest.autoconfig()`][ipytest.autoconfig].

- `run_in_thread`: if given, override the config option "run_in_thread".
- `raise_on_error`: if given, override the config option "raise_on_error".
- `addopts`: if given, override the config option "addopts".
- `defopts`: if given, override the config option "defopts".
- `display_columns`: if given, override the config option "display_columns".
[`ipytest.autoconfig()`][ipytest.autoconfig]: `run_in_thread`,
`raise_on_error`, `addopts`, `defopts`, `display_columns`, `coverage`,
`force_reload`.

**Returns**: the exit code of `pytest.main`.

Expand Down
4 changes: 3 additions & 1 deletion ipytest/_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@ def config(
an `ipytest.Error` if pytest fails.
* `force_reload` (default `()`): a sequence of modules to remove from the
global module cache before executing tests. The listed modules are passed
to [`ipytest.force_reload`][ipytest.force_reload].
to [`ipytest.force_reload`][ipytest.force_reload]. For simplicity, a
single module can also be specified as a string. Glob-style wildcards are
supported.
"""
args = collect_args()
new_config = {
Expand Down
10 changes: 3 additions & 7 deletions ipytest/_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,9 @@ def run(
The following parameters override the config options set with
[`ipytest.config()`][ipytest.config] or
[`ipytest.autoconfig()`][ipytest.autoconfig].
- `run_in_thread`: if given, override the config option "run_in_thread".
- `raise_on_error`: if given, override the config option "raise_on_error".
- `addopts`: if given, override the config option "addopts".
- `defopts`: if given, override the config option "defopts".
- `display_columns`: if given, override the config option "display_columns".
[`ipytest.autoconfig()`][ipytest.autoconfig]: `run_in_thread`,
`raise_on_error`, `addopts`, `defopts`, `display_columns`, `coverage`,
`force_reload`.
**Returns**: the exit code of `pytest.main`.
"""
Expand Down

0 comments on commit bf01535

Please sign in to comment.