summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEli Bendersky <eliben@gmail.com>2021-10-29 10:03:20 -0700
committerEli Bendersky <eliben@gmail.com>2021-10-29 10:03:20 -0700
commit268067bb6dcdb816010ae2dbc2c5edc9e260c59d (patch)
tree1b171984473c0e215726229b0bc4ff78f31dfb59 /tests
parent43997f164eaf871f1d8b996b94a0b6bf1ae17997 (diff)
downloadpycparser-268067bb6dcdb816010ae2dbc2c5edc9e260c59d.tar.gz
Only run example tests on Linux, since many require cpp
Diffstat (limited to 'tests')
-rw-r--r--tests/test_examples.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test_examples.py b/tests/test_examples.py
index 24cf16e..3c516e1 100644
--- a/tests/test_examples.py
+++ b/tests/test_examples.py
@@ -4,13 +4,14 @@ import time
import unittest
sys.path.insert(0, '.')
-from tests.test_util import run_exe
+from tests.test_util import run_exe, cpp_supported
EMIT_ELAPSED_TIME = False
# Runs all pycparser examples with no command-line arguments and makes sure they
# run successfully (return code = 0), without actually verifying their output.
class TestExamplesSucceed(unittest.TestCase):
+ @unittest.skipUnless(cpp_supported(), 'cpp only works on Unix')
def test_all_examples(self):
root = './examples'
for filename in os.listdir(root):