Example #1
0
 def test_register(self):
     lib = PushTypeLibrary(register_core=False)
     lib.register(PushChar)
     assert set(lib.keys()) == {"char", "exec", "code"}
     assert lib["char"] == PushChar
Example #2
0
 def test_register(self):
     lib = PushTypeLibrary(register_core=False)
     lib.register(PushChar)
     assert set(lib.keys()) == {"char", "exec", "code"}
     assert lib["char"] == PushChar
Example #3
0
 def test_register_duplicates(self):
     lib = PushTypeLibrary(register_core=False)
     lib.create_and_register("char", (int, ))
     lib.register(PushChar)
     assert set(lib.keys()) == {"char", "exec", "code"}
     assert lib["char"] == PushChar
Example #4
0
 def test_register_duplicates(self):
     lib = PushTypeLibrary(register_core=False)
     lib.create_and_register("char", (int, ))
     lib.register(PushChar)
     assert set(lib.keys()) == {"char", "exec", "code"}
     assert lib["char"] == PushChar