Remove redundant unit-tests #2610
Replies: 2 comments 2 replies
-
@kristjanvalur could we do something like we did for the http tests? one test for all the integrations? I understand that one test might be enough for the internals, but I prefer to make sure all integrations are fully tested, even if there's repetition in what is being tested :) Here's an example of http test we have: https://github.com/strawberry-graphql/strawberry/blob/main/tests/http/test_query.py#L9-L17 the http client is parametrize per integration 😊 |
Beta Was this translation helpful? Give feedback.
2 replies
-
See PR #2635 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The unit tests contain the same tests, for internal functionality, repeated for different integrations.
At least, this is the case for tests of protocols such as
graphql-transport-ws
. For aiohttp, asgi and fastapi, the same internal details are tested over again, only within the scope of different integration. There is no added benefit of having the same protocol test repeated three times (for synchronous and asynchronous client, plus two server integrations), not when the test is really not testing the integration at all but internal protocol logic.Could we pick an integration to use to test the internals of graphql-transport-ws, (and maybe graphql-ws), to all of the functional testings using that integration, then for each integration we can test only those features which are peculiar to that integration?
Beta Was this translation helpful? Give feedback.
All reactions