def doit(): set_logger(get_logfile_logger()) my_remote_callbacks = MyRemoteCallbacks() set_remote_callbacks(my_remote_callbacks) environment = Environment(True, ProbeMode_STANDARD_WRITE_MOCKUP if save_mockup else ProbeMode_STANDARD, TargetMode_DIRECT) if save_mockup: environment.set_mockup_filename("mockup.xml") storage = Storage(environment) try: storage.probe() except Exception as exception: print(exception.what()) exit(1) print() probed = storage.get_probed() print(probed) if save_devicegraph: probed.save("devicegraph.xml")
def doit(): set_logger(get_logfile_logger()) my_remote_callbacks = MyRemoteCallbacks() set_remote_callbacks(my_remote_callbacks) environment = Environment( True, ProbeMode_STANDARD_WRITE_MOCKUP if save_mockup else ProbeMode_STANDARD, TargetMode_DIRECT) if save_mockup: environment.set_mockup_filename("mockup.xml") storage = Storage(environment) storage.probe() print() probed = storage.get_probed() print(probed) if save_devicegraph: probed.save("devicegraph.xml")
def test_logger(self): my_logger = MyLogger() set_logger(my_logger) gc.collect() # Just test that our logger object is called and not already garbage # collected. environment = Environment(True, ProbeMode_NONE, TargetMode_DIRECT) s = Storage(environment) self.assertTrue(my_logger_called)