From 2d04acf227ce24364b1f33b419cf3fae39c16535 Mon Sep 17 00:00:00 2001 From: Erez Shinan Date: Tue, 2 Jan 2018 10:34:22 +0200 Subject: [PATCH] Version 0.5.0 is out with lots of improvements --- MANIFEST.in | 2 +- lark/__init__.py | 2 +- tests/__main__.py | 5 ++++- tests/test_nearley/test_nearley.py | 4 ++++ 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index 16e8d31..5ee4903 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1 +1 @@ -include README.md LICENSE docs/* examples/*.py tests/*.py examples/*.png +include README.md LICENSE docs/* examples/*.py examples/*.png examples/*.g tests/*.py tests/test_nearley/*.py tests/test_nearley/grammars/* diff --git a/lark/__init__.py b/lark/__init__.py index ebd8d8d..1f221da 100644 --- a/lark/__init__.py +++ b/lark/__init__.py @@ -4,4 +4,4 @@ from .lexer import UnexpectedInput, LexError from .lark import Lark from .utils import inline_args -__version__ = "0.4.1" +__version__ = "0.5.0" diff --git a/tests/__main__.py b/tests/__main__.py index c9fe2ad..4ba32f7 100644 --- a/tests/__main__.py +++ b/tests/__main__.py @@ -5,7 +5,10 @@ import logging from .test_trees import TestTrees -from .test_nearley.test_nearley import TestNearley +try: + from .test_nearley.test_nearley import TestNearley +except ImportError: + pass # from .test_selectors import TestSelectors # from .test_grammars import TestPythonG, TestConfigG diff --git a/tests/test_nearley/test_nearley.py b/tests/test_nearley/test_nearley.py index e980f9f..900fe3e 100644 --- a/tests/test_nearley/test_nearley.py +++ b/tests/test_nearley/test_nearley.py @@ -14,6 +14,10 @@ TEST_PATH = os.path.abspath(os.path.dirname(__file__)) NEARLEY_PATH = os.path.join(TEST_PATH, 'nearley') BUILTIN_PATH = os.path.join(NEARLEY_PATH, 'builtin') +if not os.path.exists(NEARLEY_PATH): + print("Skipping Nearley tests!") + raise ImportError("Skipping Nearley tests!") + class TestNearley(unittest.TestCase): def test_css(self): fn = os.path.join(NEARLEY_PATH, 'examples/csscolor.ne')