-
Notifications
You must be signed in to change notification settings - Fork 7
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
tests: add first approval tests #453
Conversation
tests/comparator.py
Outdated
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
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.
Looks good. I am going to use it.
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):
|
fcd8da1
to
56723c2
Compare
add custom reporter and comparator
add custom Namer class to make paramatrized tests work
ff44b91
to
eb11ab7
Compare
Leads to test duplication. Will be fixed in another PR. -> #456