def test_is_empty(self): empty_word = Word() assert empty_word.is_empty()
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)