Exemple #1
0
 def test_unregister_reserved(self):
     lib = PushTypeLibrary()
     with pytest.raises(ValueError):
         lib.unregister("untyped")
Exemple #2
0
 def test_unregister(self):
     lib = PushTypeLibrary()
     lib.unregister("char")
     lib.unregister("float")
     assert set(lib.keys()) == {"int", "str", "bool", "exec", "code"}
Exemple #3
0
 def test_unregister_reserved(self):
     lib = PushTypeLibrary()
     with pytest.raises(ValueError):
         lib.unregister("exec")
Exemple #4
0
 def test_unregister(self):
     lib = PushTypeLibrary()
     lib.unregister("char")
     lib.unregister("float")
     assert set(lib.keys()) == ALL_CORE_TYPE_NAMES - {"char", "float"}
Exemple #5
0
 def test_unregister(self):
     lib = PushTypeLibrary()
     lib.unregister("char")
     lib.unregister("float")
     assert set(lib.keys()) == {"int", "str", "bool", "exec", "code"}