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