[Edu-sig] UnitTest?

Vern Ceder vceder at gmail.com
Thu Feb 24 17:31:27 CET 2011


On Thu, Feb 24, 2011 at 11:25 AM, Vernon Cole <vernondcole at gmail.com> wrote:
> I think for most high-school level work, use of the "assert" statement would
> be the first thing to teach.

Doctests can also be good way to introduce the idea of testing. It's
maybe a bit easier for beginners to grasp and a very natural Python
technique.

Vern

> It can be used in an "if __name__ == '__main__': " construct in a module to
> make a good quick test.
>
> see https://launchpad.net/romanclass as an example.
>
> Simple modules do not need anything as complex as unittest. It would be a
> good advanced subject, though.
> --
> Vernon Cole
>
>
> _______________________________________________
> Edu-sig mailing list
> Edu-sig at python.org
> http://mail.python.org/mailman/listinfo/edu-sig
>
>



-- 
Vern Ceder
vceder at gmail.com, vceder at dogsinmotion.com
The Quick Python Book, 2nd Ed - http://bit.ly/bRsWDW


More information about the Edu-sig mailing list