I worked on a 15K loc Python project. We didn't have tests because it was hard to isolate.
We started to puts some asserts here and there on parts of the code we weren't sure about.
After few months, we simply puts assert _everywhere_ and it quickly became a weird but efficient way to cover our backs and it help us to make refactoring fun.
With assert, you can start to think if particular branching is relevant or should be placed on the caller side.
We consider an AssertionError as a developer error and it makes a real difference in investigation time between other errors that could raise.
I worked on a 15K loc Python project. We didn't have tests because it was hard to isolate.
We started to puts some asserts here and there on parts of the code we weren't sure about.
After few months, we simply puts assert _everywhere_ and it quickly became a weird but efficient way to cover our backs and it help us to make refactoring fun.
With assert, you can start to think if particular branching is relevant or should be placed on the caller side.
We consider an AssertionError as a developer error and it makes a real difference in investigation time between other errors that could raise.