The expiration time for new job artifacts in CI/CD pipelines is now 30 days (GitLab default). Previously generated artifacts in already completed jobs will not be affected by the change. The latest artifacts for all jobs in the latest successful pipelines will be kept. More information: https://gitlab.lrz.de/help/user/admin_area/settings/continuous_integration.html#default-artifacts-expiration

Commit 2aeaf0de authored by Eckhart Arnold's avatar Eckhart Arnold
Browse files

new test failing transformation_factory with generic meta

parent efd94bc3
......@@ -26,7 +26,7 @@ sys.path.extend(['../', './'])
from DHParser.syntaxtree import parse_sxpr
from DHParser.transform import traverse, reduce_single_child, remove_whitespace, \
traverse_locally, collapse, lstrip, rstrip, remove_content
traverse_locally, collapse, lstrip, rstrip, remove_content, remove_tokens
class TestRemoval:
......@@ -79,6 +79,15 @@ class TestRemoval:
remove_content([cst], '#')
assert cst.content == "facitergula"
def test_remove_tokens(self):
cst = parse_sxpr('(wortarten (:Token "ajektiv") (:Token "et") (:Token "praeposition"))')
ast_table = {
"wortarten": [remove_tokens({"et"})],
"*": []
}
traverse(cst, ast_table)
print(cst.as_sxpr())
class TestConditionalTransformations:
"""Tests conditional transformations."""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment