Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #2884

Re: Creating unit tests on the fly

From Ben Finney <ben+python@benfinney.id.au>
Newsgroups comp.lang.python
Subject Re: Creating unit tests on the fly
References <55ab5243-da42-4933-b3e5-b8189698b11e@m13g2000yqb.googlegroups.com> <e2a1efe6-17bb-4d94-8fcc-b812b41f6b75@d28g2000yqf.googlegroups.com>
Date 2011-04-09 08:46 +1000
Message-ID <87fwpse4zt.fsf@benfinney.id.au> (permalink)
Organization Unlimited download news at news.astraweb.com

Show all headers | View raw


Raymond Hettinger <python@rcn.com> writes:

> I think you're going to need a queue of tests, with your own test
> runner consuming the queue, and your on-the-fly test creator running
> as a producer thread.

I have found the ‘testscenarios’ library very useful for this: bind a
sequence of (name, dict) tuples to the test case class, and each tuple
represents a scenario of data fixtures that will be applied to every
test case function in the class.

    <URL:http://pypi.python.org/pypi/test-scenarios>

You (the OP) will also find the ‘testing-in-python’ discussion forum
<URL:http://lists.idyll.org/listinfo/testing-in-python> useful for this
topic.

-- 
 \       “Never use a long word when there's a commensurate diminutive |
  `\                                    available.” —Stan Kelly-Bootle |
_o__)                                                                  |
Ben Finney

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Creating unit tests on the fly Roy Smith <roy@panix.com> - 2011-04-08 12:10 -0700
  Re: Creating unit tests on the fly Raymond Hettinger <python@rcn.com> - 2011-04-08 14:50 -0700
    Re: Creating unit tests on the fly Ben Finney <ben+python@benfinney.id.au> - 2011-04-09 08:46 +1000
      Re: Creating unit tests on the fly Roy Smith <roy@panix.com> - 2011-04-08 22:02 -0400
        Re: Creating unit tests on the fly Ben Finney <ben+python@benfinney.id.au> - 2011-04-09 12:15 +1000
    Re: Creating unit tests on the fly Roy Smith <roy@panix.com> - 2011-04-10 22:45 -0400

csiph-web