[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: How to tell if running script directly?
- From: "Liam Devine" <liamdevine@...>
- Date: Sat, 05 Apr 2014 13:12:02 +0100
On 05/04/14 11:28, tonyp wrote:
>
> Why? This is very useful for adding test code to module for unit
> testing. You want the code to run when running the library script
> directly but you do not want to run when 'included' by the main app...
>
Surely unit testing code should be located in a separate file from the
code which it is testing and best practise may also suggest that their
should not be a difference between the code being run as part of an
application or as part of a test suite.
--
Liam
Attachment:
signature.asc
Description: OpenPGP digital signature