You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we began OCR-D/core, we targeted only unittests with some enhancements over time in tests/base.py. To run the tests, we're actually using pytest, though.
We currently have ~300 tests which use various mechanisms to achieve the same task, often with nested context Managers (with TemporaryDirectory() as tempdir: and such).
@M3ssman suggested embracing pytest's features to a larger extent. For example, pytest offers decorators to achieve much of what we currently implement ourselves. For clarity and maintenance, we should refactor the test suite in a more consistent style.
This is obviously nothing that directly improves the user experience, so it is a bit of an unthankful but important task. At least for new tests, we should strive to make use of pytest's features and update the existing tests by and by.
The text was updated successfully, but these errors were encountered:
When we began OCR-D/core, we targeted only
unittests
with some enhancements over time intests/base.py
. To run the tests, we're actually using pytest, though.We currently have ~300 tests which use various mechanisms to achieve the same task, often with nested context Managers (
with TemporaryDirectory() as tempdir:
and such).@M3ssman suggested embracing pytest's features to a larger extent. For example, pytest offers decorators to achieve much of what we currently implement ourselves. For clarity and maintenance, we should refactor the test suite in a more consistent style.
This is obviously nothing that directly improves the user experience, so it is a bit of an unthankful but important task. At least for new tests, we should strive to make use of pytest's features and update the existing tests by and by.
The text was updated successfully, but these errors were encountered: