[Web-SIG] Re: PEP 333 / unittest

Phillip J. Eby pje at telecommunity.com
Wed Oct 20 18:50:08 CEST 2004

At 11:58 AM 10/20/04 -0400, Greg Wilson wrote:
>Hi Phillip.  Hope you don't mind mail out of the blue, but I was wondering
>if anyone had already done work to integrate WSGI and the unit test
>framework, i.e. built a mock-WSGI that could be dropped directly into

Check the SIG list archives; there are people who have talked about various 
tests they've done.  I don't know if any of their work qualifies as what 
you're talking about.

'wsgiref' also has some simple unit tests that run simple WSGI applications 
under a "server" to test the server handlers, but I didn't really make any 
effort for them to be generic beyond the scope of server implementations 
based on wsgiref.  And the wsgiref handlers have lots of 'assert' 
statements in them designed to cause a crash if you run a broken 
application under a wsigref-based server.  That's about all I've done in 
the area of testing.

I seem to recall Ian Bicking created a few WSGI test programs, including a 
'lint' middleware to run between a server and an application, testing both 
for compliance, and an 'echo' application to be used by an external test 
script verifying a server's compliance.

At this point, I would say that all of these various tests are preliminary, 
and there has been little or no interoperability testing to verify that the 
tests themselves are correct.

More information about the Web-SIG mailing list