Skip to content
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

feat: Add tests for type info #27

Merged
merged 7 commits into from Jul 1, 2022
Merged

Conversation

last-partizan
Copy link
Contributor

Here I added tests using pyright and pytest plugin for snapshot testing syrupy. It allows us not to hardcode expected data in test, but to have it separated in snapshot files.

Those tests are running only on python 3.7+, other versions aren't supported, so I added pytest.mark.skipif, which could be removed after next major version and dropping everything below 3.7.

Right now pyright is checking that there is no errors in unexpected places, and errors in expected places.

setup.cfg Outdated Show resolved Hide resolved
.github/workflows/base.yml Outdated Show resolved Hide resolved
tests/pyright/base.py Outdated Show resolved Hide resolved
setup.cfg Outdated Show resolved Hide resolved
@smarie
Copy link
Owner

smarie commented Mar 1, 2022

Great @last-partizan , thanks so much for sticking to this ! I made a few comments, small details / maintainability topics mostly

@last-partizan last-partizan force-pushed the 22-tests branch 4 times, most recently from 0eea523 to cfff747 Compare May 18, 2022 19:17
@last-partizan
Copy link
Contributor Author

Huh, i've got somewhat distracted by Russians invading my country and forgot about this PR :)

Now let's get to work!

noxfile.py Outdated Show resolved Hide resolved
@last-partizan last-partizan requested a review from smarie May 18, 2022 19:37
.github/workflows/base.yml Outdated Show resolved Hide resolved
setup.cfg Outdated Show resolved Hide resolved
@smarie
Copy link
Owner

smarie commented May 19, 2022

Thanks a lot @last-partizan for this great PR ! I have a few comments concerning the way pyright is installed, see details in the files diff. However otherwise it looks really good !

(I hope that you and your relatives are safe. Terrible times...)

Note that I'll be away next week so sorry if there are delays in reviewing the next round.

@last-partizan
Copy link
Contributor Author

Everything ready!

@smarie smarie merged commit ffa1e51 into smarie:main Jul 1, 2022
@smarie
Copy link
Owner

smarie commented Jul 1, 2022

Thanks @last-partizan ! Sorry for the wait... (And on a side note I hope everything is ok with you and relatives wrt the war)

@last-partizan last-partizan deleted the 22-tests branch July 1, 2022 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants