Skip to content

Automatic testing to confirm that improper usage fails Pyright type-check #2163

Answered by WasabiFan
WasabiFan asked this question in Q&A
Discussion options

You must be logged in to vote

Since it didn't seem like there was much prior art in this area, I've implemented some simple infrastructure for this myself.

I developed it initially in a private repo but I've re-posted it here for others' reference: https://github.com/WasabiFan/pyright-ui-test-poc

I'd love to hear thoughts/feedback on it and whether others think it would be useful. I have developed a spatial frame transformation library as part of an internal project which uses generics to denote the reference frame a measurement is in, and am now testing it with these utilities. So far, it's been going pretty well.

Thanks to everyone for the other answers and discussion in this thread.

Replies: 3 comments 8 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@WasabiFan
Comment options

@jakebailey
Comment options

@WasabiFan
Comment options

Comment options

You must be logged in to vote
5 replies
@erictraut
Comment options

@JelleZijlstra
Comment options

@WasabiFan
Comment options

@WasabiFan
Comment options

@RobertCraigie
Comment options

Answer selected by WasabiFan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants