浏览代码

Tests: Fixed skipping nearley when it isn't included

gm/2021-09-23T00Z/github.com--lark-parser-lark/v0.12.0
Erez Sh 3 年前
父节点
当前提交
b1103bdcf1
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. +2
    -2
      tests/test_nearley/test_nearley.py

+ 2
- 2
tests/test_nearley/test_nearley.py 查看文件

@@ -15,8 +15,8 @@ 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):
logger.warn("Nearley not installed. Skipping Nearley tests!")
if not os.path.exists(BUILTIN_PATH):
logger.warn("Nearley not included. Skipping Nearley tests! (use git submodule to add)")
raise ImportError("Skipping Nearley tests!")

import js2py # Ensures that js2py exists, to avoid failing tests


正在加载...
取消
保存