Esempio n. 1
0
def test_changing_type_of_unbound_rel_mirrors_to_pair_rev():
    rel = Rel("KNOWS")
    assert rel.pair is None
    rev = -rel
    assert rel.pair is rev
    assert rev.pair is rel
    assert rel.type == "KNOWS"
    assert rev.type == "KNOWS"
    rel.type = "LIKES"
    assert rel.type == "LIKES"
    assert rev.type == "LIKES"
Esempio n. 2
0
def test_type_of_unbound_rel_is_mutable():
    ab = Rel("KNOWS")
    ab.type = "LIKES"
    assert ab.type == "LIKES"