def setUp(self): # Convert the marionette weakref to an object, just for the # duration of the test; this is deleted in tearDown() to prevent # a persistent circular reference which in turn would prevent # proper garbage collection. self.start_time = time.time() self.pingServer = PingServer() self.pingServer.start() self.marionette = Marionette(bin=self.binary, profile=self.profile) if self.marionette.session is None: self.marionette.start_session() self.marionette.reset_timeouts()