def _setUp(self): cls = self.__class__ if hasattr(cls, '_setupRan'): return cls.reqport = start_process() cls.reqsock = create_client(cls.reqport) appendstr = 'import sys; sys.path.append(%r)' % ( os.path.dirname(__file__)) sendrecv(cls.reqsock, ('exec', appendstr)) cls.testmodule = cls.__module__ cls.testalias = cls.testmodule.replace('.', '_') impstr = 'import %s as %s' % (cls.testmodule, cls.testalias) sendrecv(cls.reqsock, ('exec', impstr)) MayaTestCase._setupRan = True
def _create_client(self): return oldmayaclient.create_client(self.realport)