예제 #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"}