mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-17 08:49:31 -06:00
Working readType, functionType, unmarshaller for types (except exprs) in Python bindings
This commit is contained in:
@@ -94,6 +94,9 @@ def test_readType_equality_1():
|
||||
def test_readType_equality_2():
|
||||
assert pgf.readType("A -> B") == pgf.readType("A->B")
|
||||
|
||||
def test_readType_equality_3():
|
||||
assert pgf.readType("A -> B -> C") == pgf.readType("A->B -> C")
|
||||
|
||||
def test_readType_inequality_1():
|
||||
assert pgf.readType("A") != pgf.readType("B")
|
||||
|
||||
@@ -109,6 +112,13 @@ def test_functionType_2(PGF):
|
||||
def test_functionType_3(PGF):
|
||||
assert PGF.functionType("c") == pgf.readType("N -> S")
|
||||
|
||||
def test_functionType_non_existant(PGF):
|
||||
with pytest.raises(KeyError):
|
||||
assert PGF.functionType("cbx")
|
||||
|
||||
def test_functionType_wrong(PGF):
|
||||
assert PGF.functionType("c") != pgf.readType("N -> S -> X")
|
||||
|
||||
def test_startCat(PGF):
|
||||
with pytest.raises(pgf.PGFError):
|
||||
PGF.startCat()
|
||||
|
||||
Reference in New Issue
Block a user