typeddjango / pytest-mypy-plugins

pytest plugin for testing mypy types, stubs, and plugins
https://pypi.org/project/pytest-mypy-plugins/
MIT License
100 stars 26 forks source link

sdist is missing tests #114

Closed mtelka closed 1 year ago

mtelka commented 1 year ago

The sdist package at PyPI is missing tests. Please add tests to sdist to make downstream testing easier. Thank you.

sobolevn commented 1 year ago

Hm, we have tests in a form of yml files. This is why they are not include (probably).

sobolevn commented 1 year ago

Done, please reopen if https://pypi.org/project/pytest-mypy-plugins/1.11.1/ does not work for you! 👍

mtelka commented 1 year ago

I'm afraid that without pytest.ini and/or mypy.ini testing won't work properly.

... testing ...

And yes, I see this:

_______________________ reveal_type_extension_is_loaded ________________________
$(BUILD_DIR)/pytest_mypy_plugins/tests/test-extension.yml:3:
E   pytest_mypy_plugins.utils.TypecheckAssertionError: Invalid output:
E   Actual:
E     (empty)
E   Expected:
E     main:1: note: Revealed type is "Literal[1]?"  (diff)

I added pytest.ini and now tests for 1.11.1 sdist pass. It looks like mypy.ini is not needed (tested with Python 3.9.16) but you likely wants to include it in sdist too.

BTW, I do not need new release with this issue fixed. It is perfectly okay to just fix this in git repo and release new version only after there is something really usable for release. :-)

Thank you!

sobolevn commented 1 year ago

Done! Please, check this once again :)

mtelka commented 1 year ago

The change looks reasonable. Thank you!