Loading files
ec334891fThis file is pinned to the selected release. Download the original to open it in your design tool.
Files from this revision, including CAD and LFS contents. Git history is not included.
Or in GitHub Desktop, choose File → Clone repository → URL and paste this address.
Public repositories can be cloned without signing in. For pushing, use your ThingAtlas username and a Git access token as the password.
git lfs install git clone https://thingatlas.com/git/-unclaimed/tulipcc-498083946.git
Includes Git history, branches, and Git LFS files. Clones the repository’s default branch, regardless of the version shown here.
ec334891fThis file is pinned to the selected release. Download the original to open it in your design tool.
import os
import sys
import time
import unittest
sys.path.insert(0, '.')
from tests.test_util import run_exe, cpp_supported
# 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):
if os.path.splitext(filename)[1] == '.py':
with self.subTest(name=filename):
path = os.path.join(root, filename)
rc, stdout, stderr = run_exe(path)
self.assertEqual(
rc, 0, f'example "{filename}" failed with stdout =\n{stdout}\nstderr =\n{stderr}')
if __name__ == '__main__':
unittest.main()