[issue27512] os.fspath is certain to crash when exception raised in __fspath__
Ethan Furman
report at bugs.python.org
Thu Jul 14 11:31:26 EDT 2016
Ethan Furman added the comment:
> I think such omissions are hard to predict and you won't know where is
> the omission until you encounter it. So if you don't know, how do you
> know what to put in the tests?
True.
> And if it is encountered and fixed, such errors should not happen again.
False.
Such errors *will* happen again -- they are called regressions. In order to avoid those we add tests, and those tests serve several purposes:
- confirm the problem has been fixed (not every bug is a core-dump)
- confirm that changes in the future don't reintroduce the bug
- communicate past difficulties and possible gotchas to new developers
In short: add tests; patches are not complete without them.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27512>
_______________________________________
More information about the Python-bugs-list
mailing list