%PDF- %PDF-
Direktori : /usr/local/lib/python2.7/test/ |
Current File : //usr/local/lib/python2.7/test/test_dummy_thread.pyc |
ó Nêáac @ sÉ d Z d d l a d d l Z d d l Z d d l Z d d l Z d d l m Z d a d e j f d „ ƒ YZ d e j f d „ ƒ YZ d e j f d „ ƒ YZ d d „ Z e d k rÅ e ƒ n d S( sÕ Generic thread tests. Meant to be used by dummy_thread and thread. To allow for different modules to be used, test_main() can be called with the module to use as the thread implementation as its sole argument. iÿÿÿÿN( t test_supporti t LockTestsc B s_ e Z d Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z RS( s Test lock objects.c C s t j ƒ | _ d S( N( t _threadt allocate_lockt lock( t self( ( s2 /usr/local/lib/python2.7/test/test_dummy_thread.pyt setUp s c C s | j | j j ƒ d ƒ d S( Ns( Lock object is not initialized unlocked.( t assertFalseR t locked( R ( ( s2 /usr/local/lib/python2.7/test/test_dummy_thread.pyt test_initlock s c C s7 | j j ƒ | j j ƒ | j | j j ƒ d ƒ d S( Ns% Lock object did not release properly.( R t acquiret releaseR R ( R ( ( s2 /usr/local/lib/python2.7/test/test_dummy_thread.pyt test_release s c C s | j t j | j j ƒ d S( N( t assertRaisesR t errorR R ( R ( ( s2 /usr/local/lib/python2.7/test/test_dummy_thread.pyt test_improper_release% s c C s | j | j j d ƒ d ƒ d S( Ni s) Conditional acquiring of the lock failed.( t assertTrueR R ( R ( ( s2 /usr/local/lib/python2.7/test/test_dummy_thread.pyt test_cond_acquire_success) s c C s0 | j j d ƒ | j | j j d ƒ d ƒ d S( Ni s= Conditional acquiring of a locked lock incorrectly succeeded.( R R R ( R ( ( s2 /usr/local/lib/python2.7/test/test_dummy_thread.pyt test_cond_acquire_fail. s c C s* | j j ƒ | j | j j ƒ d ƒ d S( Ns Uncondional locking failed.( R R R R ( R ( ( s2 /usr/local/lib/python2.7/test/test_dummy_thread.pyt test_uncond_acquire_success5 s c C s<