How to test?

Cholo Lennon chololennon at hotmail.com
Fri Apr 24 18:12:39 EDT 2020


On 24/4/20 15:40, Manfred Lotz wrote:
> I have a command like application which checks a directory tree for
> certain things. If there are errors then messages will be written to
> stdout.
> 
> How to test this in the best way?
> 
> One idea was for the error situations to write messages to files and
> then later when running the tests to compare the error messages output
> to the previously saved output.
> 
> Is there anything better?
> 
> 

Maybe I am wrong because I don't understand your scenario: If your 
application is like a command, it has to return an error code to the 
system, a distinct number for each error condition. The error code is 
easier to test than the stdout/stderr.

--
Cholo Lennon
Bs.As.
ARG



More information about the Python-list mailing list