On 06Mar2019 23:41, Alan Gauld <alan.ga...@yahoo.co.uk> wrote:
On 06/03/2019 22:38, Mats Wichmann wrote:
"It depends".
...
How's that for a definitive answer?  :)

Pretty good! and I agree with all of it :-)

Although  personally I always use a test subdirectory
and then, for building a distributable, use a file
filter (eg find in *nix) to prune those out.
All version controlled of course!

There are those who argue that it is better to include the test files in the distribution. Aside from transparency and completeness, it may also aid bug reports as a test might only fail in the end user's environment and not that of the developer. Being able to get the error output from the end user running the tests is a win there.

Q: How many user support people does it take to change a light bulb?
A: We have an exact copy of the light bulb here and it seems to be
  working fine.  Can you tell me what kind of system you have?

For variety, in my own code I keep the tests for foo.py in foo_tests.py, the better to be seen next to foo.py in listings and file completion.

Cheers,
Cameron Simpson <c...@cskk.id.au>
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to