A testcase for a Queue like class.

Antoon Pardon apardon at forel.vub.ac.be
Fri Apr 15 03:32:21 EDT 2005


I'm writing some sort of replacement for the Queue module.
I'm calling the class I'm writing a tube. However I'm stuck
in how I should write some testcases.

The tube will have an open method, with as argument an
access parameter that will determine if the thread wants
to put things (write) on the queue or will get (read) things
from the queue (or both). Now what I want is that a thread that
opens the tube for read access will block until a thread opens
the same tube for write access.

The problem is how do I put such a requirement in a test case?

-- 
Antoon Pardon



More information about the Python-list mailing list