Skip to content

Commit b36f292

Browse files
committed
unittest: Add skipIf decorator.
1 parent 49140d6 commit b36f292

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

unittest/unittest.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@ def _inner(self):
133133
return _inner
134134
return _decor
135135

136+
def skipIf(cond, msg):
137+
if not cond:
138+
return lambda x: x
139+
return skip(msg)
136140

137141
def skipUnless(cond, msg):
138142
if cond:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy