Ϫf dZddlmZddlmZeddGddeZeddGd d eZGd d eZGd deZGddeZ y)z! Tests for L{twisted.trial.util} )skipIf)TestCaseTz.Skip all tests when @skipIf is used on a classc eZdZdZddZddZy)SkipDecoratorUsedOnClasszZ All tests should be skipped because @skipIf decorator is used on this class. NctdNz%Test should skip and never reach here Exceptionselfs >/usr/lib/python3/dist-packages/twisted/trial/test/test_skip.pytest_shouldNeverRun_1z.SkipDecoratorUsedOnClass.test_shouldNeverRun_1?@@ctdrr r s r test_shouldNeverRun_2z.SkipDecoratorUsedOnClass.test_shouldNeverRun_2rrreturnN__name__ __module__ __qualname____doc__rrrr rr AArrc eZdZdZddZddZy)'SkipDecoratorUsedOnClassWithEmptyReasonz All tests should be skipped because @skipIf decorator is used on this class, even if the reason is an empty string Nctdrr r s r rz=SkipDecoratorUsedOnClassWithEmptyReason.test_shouldNeverRun_1#rrctdrr r s r rz=SkipDecoratorUsedOnClassWithEmptyReason.test_shouldNeverRun_2&rrrrrrr rrrrrceZdZdZeddd dZeddd dZd dZed d d d Zed dd d Z y)SkipDecoratorUsedOnMethodsI Only methods where @skipIf decorator is used should be skipped. Tz"skipIf decorator used so skip testNctdrr r s r test_shouldNeverRunz.SkipDecoratorUsedOnMethods.test_shouldNeverRun/?@@rrctdrr r s r "test_shouldNeverRunWithEmptyReasonz=SkipDecoratorUsedOnMethods.test_shouldNeverRunWithEmptyReason3r&rc(|jddyNTz"Test should run and not be skipped assertTruer s r test_shouldShouldRunz/SkipDecoratorUsedOnMethods.test_shouldShouldRun7 BCrFzshould not skipc(|jddyr*r+r s r #test_shouldShouldRunWithSkipIfFalsez>SkipDecoratorUsedOnMethods.test_shouldShouldRunWithSkipIfFalse: BCrc(|jddyr*r+r s r .test_shouldShouldRunWithSkipIfFalseEmptyReasonzISkipDecoratorUsedOnMethods.test_shouldShouldRunWithSkipIfFalseEmptyReason>r1rr) rrrrrr%r(r-r0r3rrr r"r"*s D67A8A D"AAD E$%D&D E2DDrr"c$eZdZdZdZddZddZy)SkipAttributeOnClasszV All tests should be skipped because skip attribute is set on this class. z5'skip' attribute set on this class, so skip all testsNctdrr r s r test_onezSkipAttributeOnClass.test_oneKrrctdrr r s r test_twozSkipAttributeOnClass.test_twoNrrr)rrrrskipr7r9rrr r5r5Cs CDAArr5c.eZdZdZddZde_ddZy)SkipAttributeOnMethodsr#Nctd)NzShould never reach herer r s r r7zSkipAttributeOnMethods.test_oneWs122rz'skip test, skip attribute set on methodc(|jddyr*r+r s r test_shouldNotSkipz)SkipAttributeOnMethods.test_shouldNotSkip\r.rr)rrrrr7r:r?rrr r<r<Rs3>HMDrr<N) runittestrtwisted.trial.unittestrrrr"r5r<rrr rBs +>? Ax A@ Ab Ah A ADD2 A8 A DX Dr