summaryrefslogtreecommitdiff
path: root/tests/test_examples.py
diff options
context:
space:
mode:
authorKyle Lahnakoski <klahnakoski@mozilla.com>2019-10-21 23:42:51 -0400
committerPaul McGuire <ptmcg@users.noreply.github.com>2019-10-21 22:42:51 -0500
commit3481b6f3f9bb2dae7e9d88ed08989b5f71238e4b (patch)
tree7c8174b8d9b45ab39cb9119c579fe12c819c6dd2 /tests/test_examples.py
parent87d14e7ef563263417d3fddccd25636741c5b6c2 (diff)
downloadpyparsing-git-3481b6f3f9bb2dae7e9d88ed08989b5f71238e4b.tar.gz
refactor tests into tests directory (#130)
Diffstat (limited to 'tests/test_examples.py')
-rw-r--r--tests/test_examples.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/test_examples.py b/tests/test_examples.py
new file mode 100644
index 0000000..51b2240
--- /dev/null
+++ b/tests/test_examples.py
@@ -0,0 +1,30 @@
+from importlib import import_module
+import unittest
+
+
+class TestExamples(unittest.TestCase):
+
+ def _run(self, name):
+ import_module('examples.'+name)
+
+ def test_numerics(self):
+ self._run("numerics")
+
+ def test_tap(self):
+ self._run("TAP")
+
+ def test_roman_numerals(self):
+ self._run("romanNumerals")
+
+ def test_sexp_parser(self):
+ self._run("sexpParser")
+
+ def test_oc(self):
+ self._run("oc")
+
+ def test_delta_time(self):
+ self._run("delta_time")
+
+ def test_eval_arith(self):
+ self._run("eval_arith")
+