( self )
| 44 | class CancellerTest( unittest.TestCase ) : |
| 45 | |
| 46 | def testCheck( self ) : |
| 47 | |
| 48 | IECore.Canceller.check( None ) |
| 49 | |
| 50 | c = IECore.Canceller() |
| 51 | self.assertFalse( c.cancelled() ) |
| 52 | IECore.Canceller.check( c ) |
| 53 | c.cancel() |
| 54 | self.assertTrue( c.cancelled() ) |
| 55 | |
| 56 | with self.assertRaises( IECore.Cancelled ) : |
| 57 | IECore.Canceller.check( c ) |
| 58 | |
| 59 | def testFinally( self ) : |
| 60 |