New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Approval tests #453
base: main
Are you sure you want to change the base?
Approval tests #453
Conversation
matthiasschaub
commented
May 2, 2024
•
edited
edited
- for area calculation choose CRS valid world-wide not just UTM
- Choose threshold for area ratio
- Make approval tests work with parametrized fixtures
add custom reporter and comparator
if not Path(approved_path).exists() or Path(approved_path).stat().st_size == 0: | ||
return False | ||
|
||
# TODO: find optimal UTM for every feature or different projection |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
8857 seems to be an okay projection
def vector_path(tmp_path_factory, uuid_digitize) -> bytes: | ||
return tmp_path_factory.getbasetemp() / uuid_digitize / "vector.geojson" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where does tmp_path_factory come from? Do I just not see it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its pytest magic. Its a global fixture defined by pytest. No import needed.
(The other fixtures are also not imported but defined by us in conftest.py
which is discovered and parsed by pytest magic as well)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test_path_factory gives as a tmp dir unique to the current test run
For parametrized fixtures in a tests following error gets raised after the first test run (first parameter):
|