Beispiel #1
0
 def test_is_empty(self):
     empty_word = Word()
     assert empty_word.is_empty()
Beispiel #2
0
 def factory(self, word: Word) -> BaseInstruction:
     op_code = word.get_opcode()
     if word.is_empty():
         raise Exception("Empty instruction")
     return self.instructions.get(op_code, self.i_inst)(word)