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
Bot releases are hidden (Show)
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.
Published by smarie about 4 years ago
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.
Published by smarie about 4 years ago
See documentation page for details.
Published by smarie over 4 years ago
See documentation page for details.
Published by smarie over 4 years ago
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.
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.
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.
Published by smarie almost 5 years ago
Added a pyproject.toml
file.
See documentation page for details.
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.
Published by smarie about 5 years ago
Added __version__
attribute at package level.
See documentation page for details.
Published by smarie about 5 years ago
It was missing from setup.py
.
See documentation page for details.
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.
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.
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.
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.
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.
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.
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.
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.
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.