Usability improvements:
- Use the same random module name during a notebook session to allow `--ff` and
similar options to work correctly
- Allow to specify `defopts="auto"`. It only adds the current notebook to the
PyTest arguments, if no other node id that referencing the notebook is
specified. This way specifying node ids manually should work as expected
without any configuration change in most cases
- Add shorthands to generate node ids for tests using `{test_example}` as an
argument will expand to `{MODULE}::test_example`
- Allow to override `addopts`, `defopts`, `run_in_thread`, `raise_on_error`,
`display_columns` in `ipytest.run`
- Allow to specify all keyword arguments of `ipytest.run` also in `%%ipytest` by
including an initial comment of the form ` ipytest: arg1=value1, arg2=value`
- Rename `clean_tests` to `clean` and deprecate `clean_tests`. The optional
scope argument now expects a module instead of a dictionary
- Add `ipytest.force_reload`, as a simpler to use alternative to the current
`reload` function
Bug fixes:
- Fix bug for `--deselect {MODULE}::test`
- Disable variable expansion in magics to prevent issues with the `{node_id}`
shorthands in notebooks
Development changes:
- Use markdown for module documentation and doc strings
- Migrated to `pyproject.toml`
- Updated documentation
Previous versions
- `0.12.0`:
- Re-add the `raise_on_error` config option
- Return the `exit_code` from `ipyest.run()`
- `0.11.0`:
- Overwrite the program name in pytest error messages for incorrect arguments
- Deprecate `%%run_pytest` and `%%run_pytest[clean]` in favor of `%%ipytest`
- Force color pytest output by default by adding `--color=yes` to the
default `addopts` value
- Configure the number of columns available to pytest
- Add warning and workaround for non-standard IPython implementations
- `0.10.0`:
- Remove the `ModuleCollectorPlugin` in favor of relying on pytest's builtin
collection mechanism
- Allow to fully customize the command line and to skip passing the
current module as an argument
- Simplify config implementation: restrict config changes to function calls
- Allow to use the generated module name in the arguments passed to pytest
by using `{MODULE}`
- Require `python>=3.6`
- Remove `%%rewrite_asserts` magic
- Remove `tempfile_fallback` config option
- Remove `register_module` config option
- Remove `raise_on_error` config option
- Remove `filename` argument for `ipytest.run`
- Remove `return_exit_code` argument from `ipytest.run`
- Remove `running_as_test` function
- `0.9.1`:
- Add `ipython` as an explicit dependency
- `0.9.0`:
- Add `Pytest>=5.4` to the requirements
- Remove legacy functionality, mostly plain unittest integration
- The `tempfile_fallback` also kicks in, if a filename was configured, but
the file does not exist
- Add `register_module` option to register the notebook with the module
system of Python. This way `--doctest-modules` works as expected