def do_reset(self, args): """Reset the prompt; forget the read model and restart NuSMV.""" self.fsm = None self.model = None self.last = None self.paths = [] glob.reset_globals() reset_nusmv()
def test_init(self): init_nusmv() # Should not produce error fsm = BddFsm.from_filename("tests/pynusmv/models/admin.smv") reset_nusmv() # Should not produce error fsm = BddFsm.from_filename("tests/pynusmv/models/admin.smv") deinit_nusmv()
def do_read(self, arg): """ Read file as SMV model to get FSM. usage: read FILEPATH """ if len(arg) < 1: print("[ERROR] read command needs the SMV model path.") else: if self.fsm is not None: reset_nusmv() try: self.fsm = BddFsm.from_filename(arg) self.fsmpath = arg except Exception as e: print("[ERROR]", e)
def test_reset(self): init_nusmv() reset_nusmv() self.assertTrue(is_nusmv_init()) deinit_nusmv()