python-pytest-harvest

Store data created during your `pytest` tests execution, and retrieve it at the end of the session, e.g. for applicative benchmarking purposes.

BSD-3-CLAUSE License

Downloads
86.8K
Stars
63
Committers
5

Bot releases are hidden (Show)

python-pytest-harvest - 1.10.1 - Now supporting `::` in test ids

Published by smarie almost 4 years ago

  • get_session_synthesis_dct now properly handles test ids where :: is present in the id. This fix propagates to all [module/session]_results_[dct/df] fixtures, too. Fixes #45

See documentation page for details.

python-pytest-harvest - 1.10.0 - Fixed issue on old pytest

Published by smarie about 4 years ago

  • On pytest < 5.3, lazy_value parameters from pytest-cases were wrongly inserted in the module_results_df as integer instead of objects. Fixed #43 thanks to new pytest-cases 2.3.0.

See documentation page for details.

python-pytest-harvest - 1.9.3 - Fixed support for doctests

Published by smarie about 4 years ago

See documentation page for details.

python-pytest-harvest - 1.9.2 - bugfix

Published by smarie over 4 years ago

  • Fixed issue sometimes happening when xdist is not installed. Fixed #40

See documentation page for details.

python-pytest-harvest - 1.9.1 - better packaging

Published by smarie over 4 years ago

  • packaging improvements: set the "universal wheel" flag to 1, and cleaned up the setup.py. In particular removed dependency to six for setup and added py.typed file, as well as set the zip_safe flag to False. Removed tests folder from package. Fixes #38

See documentation page for details.

python-pytest-harvest - 1.9.0 - better pytest-xdist support

Published by smarie over 4 years ago

When pytest-xdist is used to distribute tests, worker node results are automatically stored in a file at the end of their respective pytest session using pickle, in a temporary .xdist_harvested/ folder. These results are automatically retrived and consolidated when any of the get_[module/session]_results_[dct/df] method is called from the master node. Finally, the temporary folder is deleted at the end of master node session. Fixes #36

New function get_fixture_store(session) to replace FIXTURE_STORE. It is robust to xdist distribution, hence preferred over direct use of FIXTURE_STORE.

See documentation page for details.

python-pytest-harvest - 1.8.0 - pytest-xdist compliance

Published by smarie over 4 years ago

  • For each of the [module/session]_results_[dct/df] fixtures, an equivalent get_<fixture_name>(session, ...) helper function is available. This allows users to access the same level of functionality than the fixture, in places where fixtures are not available (typically in a pytest hook such as the pytest_sessionfinish session finish hook). In addition the default FIXTURE_STORE is now a package variable, available directly or through the session-scoped fixture_store fixture. Fixed #33 and #34.

  • Added an example in the documentation on how to use with pytest-xdist. Fixes #32

See documentation page for details.

python-pytest-harvest - 1.7.4 - `pyproject.toml`

Published by smarie almost 5 years ago

Added a pyproject.toml file.

See documentation page for details.

python-pytest-harvest - 1.7.3 - python 2 bugfix

Published by smarie about 5 years ago

Fixed issue happening with python 2 when unicode_literals are used in the parameters receiving string types. Fixed #28

See documentation page for details.

python-pytest-harvest - 1.7.2 - added `__version__` attribute

Published by smarie about 5 years ago

Added __version__ attribute at package level.

See documentation page for details.

python-pytest-harvest - 1.7.1 - added `six` dependency

Published by smarie about 5 years ago

It was missing from setup.py.

See documentation page for details.

python-pytest-harvest - 1.7.0 - `@saved_fixture` supports all scopes

Published by smarie over 5 years ago

  • Session-scoped and Module-scoped fixtures are now supported by @saved_fixture. Fixes #17.

  • Documentation: new API reference page.

See documentation page for details.

python-pytest-harvest - 1.6.1 - Minor improvements

Published by smarie over 5 years ago

Renamed argument in create_results_bag_fixture to align with the name used in saved_fixture (store instead of storage)

Now using decopatch for decorator creation. make_saved_fixture can thus be removed, and saved_fixture simplified.

Now using latest makefun>=1.5 so that saved_fixture create proper fixture wrappers, using @makefun.wraps.

See documentation page for details.

python-pytest-harvest - 1.6.0 - improved `@saved_fixture` + minor dependency change

Published by smarie over 5 years ago

Users can now use @saved_fixture to save not only the fixture, but also some views created from it. This is interesting if each fixture is huge but users just want to save small aspects of it (name, size, etc.). Fixed #21.

Dependency to decorator has been dropped and replaced with makefun.

See documentation page for details.

python-pytest-harvest - 1.5.0 - Bug fixes concerning fixtures

Published by smarie almost 6 years ago

The fixture_store fixture, provided by the plugin, does not have autouse=True anymore. Fixed #20.

get_all_pytest_fixture_names now returns fixtures that are indirectly parametrized, as well as fixtures that are not parametrized. Fixed #19.

See documentation page for details.

python-pytest-harvest - 1.4.3 - Better exceptions for `@saved_fixture`

Published by smarie almost 6 years ago

Now raising a better exception if @saved_fixture is used on session- or module-scope fixtures. Fixes #18

See documentation page for details.

python-pytest-harvest - 1.4.2 - Fixed results bags in presence of steps (2)

Published by smarie almost 6 years ago

Another import error was causing results bag to be saved incorrectly in presence of steps.

See documentation page for details.

python-pytest-harvest - 1.4.1 - Fixed results bags in presence of steps

Published by smarie almost 6 years ago

Results bags are now compliant with pytest-steps: there are now one per step. This fixed #16.

See documentation page for details.

python-pytest-harvest - 1.4.0 - Removed integration with `pytest_steps` in default fixtures

Published by smarie almost 6 years ago

Integrating pytest-steps in default fixtures seemed like a bad idea because it led to automatic behaviour that could silently raise warnings. Let pytest-steps handle it on its side.

See documentation page for details.

python-pytest-harvest - 1.3.0 - Better integration with `pytest_steps` in default fixtures

Published by smarie almost 6 years ago

Default fixtures module_results_df and session_results_df now automatically become multi-level indexed when pytest steps is installed and there are steps in the tests.

See documentation page for details.