Browse Source

Merge pull request #782 from MegaIng/master

Fix tests failing when used with `python -m unittest discover`
tags/gm/2021-09-23T00Z/github.com--lark-parser-lark/0.11.2
Erez Shinan 3 years ago
committed by GitHub
parent
commit
a6e5af6b80
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      tests/test_parser.py

+ 1
- 1
tests/test_parser.py View File

@@ -1977,7 +1977,7 @@ def _make_parser_test(LEXER, PARSER):
%import .test_relative_import (start, WS)
%ignore WS
"""
p = _Lark(grammar, import_paths=[custom_loader2])
p = _Lark(grammar, import_paths=[custom_loader2], source_path=__file__) # import relative to current file
x = p.parse('12 capybaras')
self.assertEqual(x.children, ['12', 'capybaras'])



Loading…
Cancel
Save