fle...@gmail.com writes:

> I have a really large and mature codebase in py2, but with no test or 
> documentation.
>
> To resolve this I just had a simple idea to automatically generate tests and 
> this is how:
>
> 1. Have a decorator that logs all arguments and return values
>
> 2. Put them in a test case
>
> and have it run in production.

This works only for quite simple cases -- cases without state.

If you have something with state, than some function calls
may change the state and thereby changing the effect of later
function calls. This means: the same function call (same function,
same arguments) may give different results over time.

As a consequence, the initial state and the execution order
becomes important.

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to