31 karma · joined Jun 8, 2025 (1y ago) · 18 submissions
comment 11mo ago · link · parent
Foofactory() will automatically setup all the foreign key dependencies.
It can also generate fuzzy data, although having fuzzy data has its own issues in terms of brittle tests (if not done correctly).
comment 12mo ago · link · parent
If law code is a repository: 1. Each trial should be encoded into a law. 2. If the trial is already covered sufficiently in the codebase, and both parties agree to it result. Then case is solved. 3. If not, the new judgement leads to a "pull request" into the codebase.
comment 1y ago · link · parent
comment 1y ago · link · parent
1. The getters and setters are not called anywhere in application logic. In that case, delete the getters / setters and get to 100%.
2. The getters and setters are called somewhere in the application logic. In that case, they should have already been covered in the test for the application.
There is really no excuse to not write tests to get to 100%.
comment 1y ago · link · parent
This is from uncle bob. I hate the argument by people that 100% leads to "bad quality tests". Not doing it leads to bad quality code, people who don't care about quality of code, and hence dont write tests, suddenly start to care about quality of tests.
comment 1y ago · link · parent
To all the flat earthers out there, this property can be used to find out earth is not flat, just by drawing a giant triangle on the surface, without leaving the earth. Historically, to prove the earth is round, people have relied on the sun shining directly overhead on wells in different cities. But this approach proves it without the need to refer the sun.
comment 1y ago · link · parent
1. 100% code coverage 2. 100% branch coverage 3. 100% lint (without noqa) 4. 100% type check pass(for python/js) 5. 100% documentation coverage 6. All functions with complexity less than 5. All functions with no of lines less than 70. All files with number of lines less than 1000.
These make code high quality, and quality of life is directly proportional to qualify of your code.
comment 1y ago · link · parent
Also, another usecase is to export data from production to uat for testing some scenarios, it can be easily encoded in a sqlite file.
16.
Enforcing 100% code coverage is a bad idea, but you should do it anyway(substack.com ↗)
1 points · by abhashanand1501 · 1y ago · discuss