RobertCraigie / prisma-client-py

Prisma Client Python is an auto-generated and fully type-safe database client designed for ease of use
https://prisma-client-py.readthedocs.io
Apache License 2.0
1.76k stars 71 forks source link

Make use of property based testing #128

Open RobertCraigie opened 2 years ago

RobertCraigie commented 2 years ago

Problem

Due to auto-generated nature of the client and the heavily nested query arguments, there are many possible combinations of arguments and methods that we do not have tests for.

Suggested solution

We should be able to make use of hypothesis and their from_type strategy builder to greatly increase the coverage of our generated types.

RobertCraigie commented 2 years ago

This would've prevented #209

RobertCraigie commented 2 years ago

This is a high priority for me as it would've prevented bugs and will increase our confidence with the generated types.