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 __init__(self): #(1) self.realport = oldmayaclient.start_process() self.reqsock = self._create_client()