2 ms·
This has nothing to do with tests. Tests would catch this, but so would sensible development practices like running your code at least once before deploying it.
by icedchai 13y ago
This has nothing to do with tests. Tests would catch this, but so would sensible development practices like running your code at least once before deploying it.
- bslatkin 13y agoIn this case I believe it was a dynamic import of a module that was not used in local development. Reasonable tests would have caught this.
- icedchai 13y agoPossibly, though it is just as likely that the tests would still not catch the problem in a local dev environment if that module is not used there, right?
- viscanti 13y agoTo avoid problems like that, you probably want your dev environment as close as possible to your production environment. You probably also want to be testing your production specific code/logic (especially if you're not doing that on your local).
- freyrs3 13y agoThat would catch the SyntaxError instances he mentioned but certainly not every case of AttributeError or ValueError exception. Even good testing would not catch all of them.
- _random_ 13y agoIndeed, regression tests are not a silver bullet. It's a patch for dynamic type system.