Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #2884
| 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> |
| X-Public-Key-ID | 0xAC128405 |
| X-Public-Key-Fingerprint | 517C F14B B2F3 98B0 CB35 4855 B8B2 4C06 AC12 8405 |
| X-Public-Key-URL | http://www.benfinney.id.au/contact/bfinney-pubkey.asc |
| X-Post-From | Ben Finney <bignose+hates-spam@benfinney.id.au> |
| Date | Sat, 09 Apr 2011 08:46:14 +1000 |
| Message-ID | <87fwpse4zt.fsf@benfinney.id.au> (permalink) |
| User-Agent | Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
| Cancel-Lock | sha1:MsYWgY6JWrnS0drSA18E3MjhaeU= |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Transfer-Encoding | 8bit |
| Lines | 22 |
| Organization | Unlimited download news at news.astraweb.com |
| NNTP-Posting-Host | 3aa38c45.news.astraweb.com |
| X-Trace | DXC=]<GYf\iBZcg1m]JSMD?cjjL?0kYOcDh@jW\:Hm@YlDbj<k[0_S8l9HoUGD@iN[Hd?o]DHA:6UTY4b |
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.dougwise.org!feed.ac-versailles.fr!usenet-fr.net!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!news.glorb.com!news2.glorb.com!news-xfer.nntp.sonic.net!news.astraweb.com!border5.newsrouter.astraweb.com!not-for-mail |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:2884 |
Show key headers only | 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 | Next — Previous in thread | Next in thread | Find similar
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