If something's hard to test, that's a sign that it could be simpler. Break it into smaller pieces based on logical behavior. If you have a function that connects to a socket and logs some data and prints some data, turn it into three functions.
I'd start with the functions that only expect a live socket connection to be passed in, mock one up, and see what happens there.
In reply to Re: Re: Re: Best Approach: package module tests with tcp
by chromatic
in thread Best Approach: package module tests with tcp
by jk2addict
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |