Commit 322c019b authored by Marius Gedminas's avatar Marius Gedminas

Merge pull request #38 from zopefoundation/show-skipped-tests

Use unittest.skip to skip tests
parents 4e77e86b a9303aa2
...@@ -13,33 +13,30 @@ ...@@ -13,33 +13,30 @@
############################################################################## ##############################################################################
import platform import platform
from unittest import skip
def _skip_wo_ZODB(test_method): #pragma NO COVER def _skip_wo_ZODB(test_method): # pragma: no COVER
try: try:
import ZODB import ZODB # noqa
except ImportError: # skip this test if ZODB is not available except ImportError: # skip this test if ZODB is not available
def _dummy(*args): return skip("ZODB not available")(test_method)
pass
return _dummy
else: else:
return test_method return test_method
def _skip_under_Py3k(test_method): #pragma NO COVER
def _skip_under_Py3k(test_method): # pragma: no COVER
try: try:
unicode unicode
except NameError: # skip this test except NameError: # skip this test
def _dummy(*args): return skip("Python 3")(test_method)
pass
return _dummy
else: else:
return test_method return test_method
def _skip_on_32_bits(test_method): #pragma NO COVER
def _skip_on_32_bits(test_method): # pragma: no COVER
if platform.architecture()[0] == '32bit': if platform.architecture()[0] == '32bit':
def _dummy(*args): return skip("32-bit platform")(test_method)
pass
return _dummy
return test_method return test_method
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment