internetarchive
internetarchive copied to clipboard
mypy: `nasa_item()` is defined twice in `tests/conftest.py`
Pytest fixture/function nasa_item()
is defined twice in tests/conftest.py
. Both flake8 and mypy complain. Is this intended? I believe that the last one wins.
https://github.com/jjjake/internetarchive/blob/master/tests/conftest.py#L117-L137
@JustAnotherArchivist
I believe that the last one wins.
Probably, but I'm not sure what pytest does internally exactly. The tests don't directly reference the nasa_item
function, that's filled in by pytest at runtime via name matching (so it depends on how it keeps track of the fixtures internally). I've never been a fan of that, and this is a good example why.
Introduced by 2f927ca7, by the way.