3 ms·
Even better is the interaction between the test runner and the debugger. Unit tests are orders of magnitude more useful when you can just open a debugger on a f
by cwp 15y ago
Even better is the interaction between the test runner and the debugger. Unit tests are orders of magnitude more useful when you can just open a debugger on a failing assertion.
- stcredzero 15y agoAnd just as good: when you refactor your code, the same refactoring is often automatically applied to your tests. And the web frameworks: in many of them, you can just debug the rendering of the web page.
- lucian1900 15y agopy.test --pdb has this exact feature and I love it. Now I almost exclusively debug with unit tests.
- kingkilr 15y agoI was going to say, is that not a standard feature of test runners today? py.test is amazing though :)
- igrekel 15y agoNot to mention the integration between the debugger and Seaside... I always get a few jaw drops when I fix code and the page comes up once I press "Proceed".
- stcredzero 15y agoThe thing is, that's not really "integration." That's just the Debugger doing what it usually does. There's no abstruse code supporting that. (Usually Smalltalk environment "integration" does require a few lines of pedestrian code.)
- cwp 15y agoWell, Seaside does have explicit code to support the debug link. If you get an exception during rendering, the framework generates a 500 response with a "Debug" link. Clicking the link restarts the previous request, and when it hits the exception, it opens a debugger instead of generating the 500 response. If you fix the error and continue, the page is sent to the browser as usual. It's not a lot of code, but it's pretty clever.