2.12.2021, 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

Commit a3a5b54a authored by di68kap's avatar di68kap
Browse files

- minor corrections

parent adc76f68
......@@ -16,7 +16,7 @@ implied. See the License for the specific language governing
permissions and limitations under the License.
"""
import copy
import inspect
import regex as re
from DHParser import Node, error_messages
......@@ -140,7 +140,7 @@ def runner(tests, namespace):
pass
if __name__ == "__main__":
from run import runner
from DHParser.testing import runner
runner("", globals())
"""
def instantiate(cls_name):
......
#!/usr/bin/python3
"""test_MLW_grammar.py - test code for the MLW grammar
"""test_MLW_grammar.py - unit tests for the MLW grammar
Author: Eckhart Arnold <arnold@badw.de>
......@@ -18,7 +18,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
import DHParser.testing
from DHParser import testing
from DHParser import parsers
# from DHParser.dsl import load_compiler_suite
from MLW_compiler import get_MLW_grammar, get_MLW_transformer
......@@ -33,7 +33,7 @@ MLW_TEST_CASES_LEMMA_POSITION = {
3: "fasc|itergula"
},
"fail": {
9: "duo vocabula"
99: "duo vocabula"
}
},
......@@ -57,19 +57,20 @@ MLW_TEST_CASES_LEMMA_POSITION = {
3: " fasc-itergula fac-iet-ergula ZUSATZ sim.",
},
"fail": {
9: "* fascitergula"
99: "* fascitergula"
}
}
}
class TestMLWGrammar:
def test_lemma_position(self):
errata = DHParser.testing.test_grammar(MLW_TEST_CASES_LEMMA_POSITION,
get_MLW_grammar,
get_MLW_transformer)
errata = testing.test_grammar(MLW_TEST_CASES_LEMMA_POSITION,
get_MLW_grammar,
get_MLW_transformer)
assert not errata, str(errata)
if __name__ == "__main__":
testing.runner("", globals())
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