Slashdot Mirror


Testing Frameworks in Python

An anonymous reader writes "This article looks at Python's two standard modules for unit testing: unittest and doctest. These modules expand on the capability of the built-in assert statement, which is used for validation of pre-conditions and post-conditions within functions. The author discusses the best ways to incorporate testing into Python development, weighing the advantages of different styles for different types of projects."

3 of 120 comments (clear)

  1. Traditional testers might be interested... by tcopeland · · Score: 5, Informative

    ...in Bret Pettichord's Scripting for Testers one day class.

    It talks about eliminating some of the tediousness from testing web applications, mainly by using automated solutions like WTR.

    He's also got a list of testing resources that's got some good stuff in there...

  2. bull by kpharmer · · Score: 5, Informative

    A few thoughts:

    1. I've never had a problem with memory management in python. Can't say it doesn't exist, just never impacted my production applications.

    2. Implementing great built-in test frameworks doesn't need to wait for memory management improvements. I'm seeing almost immediate pay-offs from this kind of built-in testing.

    3. I'm implementing python as an alternative to java in large applications - with complete success. Easy to learn, easy to maintain, fast enough to handle millions of rows of data a day - what's not to like?

  3. Re:Python's dirty little secret by smallpaul · · Score: 5, Informative

    It is clear you do not know anything about Python. You are not a long-time Python developer but rather a troll. The first hint is that you misspell Guido Van Rossum's name.

    The second hint is that you cite a page from 1999. A Python developer would know that that was before Python had cyclic garbage collection. Here is an article from 2001 that describes how the issue was fixed.

    The third hint is that you point to a page that describes how to avoid creating a memory leak by appending an infinite number of items to a list. Guess what: appending an infinite number of items to a list causes a memory leak in Java, C++, C, assembly, Scheme, sh, Perl and every other programming language in the world. If you ask the computer to store a continually growing list of items, it will do so...in any language.

    If you think that Python can leak memory in circumstances where other languages would not, post an example program and we'll all test it out.