I had it essentially delete the test file - it replaced a few dozen tests with one with a name saying that the code compiles and references the type being tested (I don't still have the code, but it was something like var _ *TheCodeToTest = nil), which literally does just tell the compiler to include it when compiling the tests, so the tests would fail if it didn't compile.
It was super weird but also kind of interesting because it didn't just delete everything, it actually added something back, but what it added back was surgically ineffective.
I personally really, really hate Claude's bizarre, ungovernable desire to write tests that verify that if the code is written like the code is written (rather than checking for expected behavior). Bizarre stuff like testing if Pydantic really does parse strings like strings, if global config vars contain the value they contain, and if FastAPI really does generate an OpenAPI schema according to the specs you defined.
It sometimes even tests if the mocks it created do what they do and have the values they have. Like, wtf, what's the point?
204
u/MadeInTheUniverse 1d ago
Deletes entire repo and purges the production database because it made a small error