|
|
|
|
|
by wizofaus
1115 days ago
|
|
I've been writing unit tests for over 15 years (actually longer, but before that they were just throwaway run-once testing stubs). I wouldn't consider what you got ChatGPT to produce to be an adequate rewrite of a function to make it unit testable (and several others in this thread have expressed the same view). Even the "hack" using monkey patching makes for a more actually-useful test. |
|
See here what a unit test is versus integration test: https://www.testim.io/blog/unit-test-vs-integration-test/
And also see my reply to the other guy where I definitively show that not only is what chatgpt produced correct, but better:
https://news.ycombinator.com/item?id=36064097