Sfoglia il codice sorgente

Tests: Fixed skipping nearley when it isn't included

gm/2021-09-23T00Z/github.com--lark-parser-lark/v0.12.0
Erez Sh 3 anni fa
parent
commit
b1103bdcf1
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. +2
    -2
      tests/test_nearley/test_nearley.py

+ 2
- 2
tests/test_nearley/test_nearley.py Vedi File

@@ -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


Caricamento…
Annulla
Salva