Closed
Description
Describe the bug
When running the test suite (without js2py installed, see PiotrDabkowski/Js2Py#282), the following test fails:
======================================================================
ERROR: test_smart_decorator (tests.test_trees.TestTrees.test_smart_decorator)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/lark/lark/visitors.py", line 114, in _call_userfunc
return f.visit_wrapper(f, tree.data, children, tree.meta)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/lark/lark/visitors.py", line 491, in _vargs_inline
return f(*children)
^^^^^^^^^^^^
File "/tmp/lark/lark/visitors.py", line 471, in __call__
return self.base_func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/lark/tests/test_trees.py", line 191, in ab_classmethod
assert cls is OtherClass, cls
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: <tests.test_trees.TestTrees.test_smart_decorator.<locals>.TestCls object at 0x7f5bcf0c7390>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/tmp/lark/tests/test_trees.py", line 293, in test_smart_decorator
result = test_instance.transform(Tree(method_name, children))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/lark/lark/visitors.py", line 153, in transform
return self._transform_tree(tree)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/lark/lark/visitors.py", line 149, in _transform_tree
return self._call_userfunc(tree, children)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/lark/lark/visitors.py", line 120, in _call_userfunc
raise VisitError(tree.data, tree, e)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lark.exceptions.VisitError: Error trying to process rule "oc_ab_classmethod":
<tests.test_trees.TestTrees.test_smart_decorator.<locals>.TestCls object at 0x7f5bcf0c7390>
To Reproduce
python3.11 -m venv .venv
. .venv/bin/activate
python -m tests
Metadata
Metadata
Assignees
Labels
No labels