Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(3)  |  Derive(0)  |  Import(0)

            @staticmethod
    def get(type_, *args, **kwargs):
        if type_==PyRQIfaceType.PYRQ:
            return PyRQIface(*args, **kwargs)
        elif type_==PyRQIfaceType.MULTIPROCESSING_QUEUE:
            return QIface(*args, **kwargs)
        raise UnknownInterfaceError(type_)
        


src/p/y/PyRQ-0.4.1/test/IFace/TestPyRQIfaceFactory.py   PyRQ(Download)
    def testPyRQ(self):
        q = PyRQIfaceFactory.get(type_=PyRQIfaceType.PYRQ)
        assert isinstance(q, PyRQIface)
    def testMultiprocessingQ(self):
        q = PyRQIfaceFactory.get(type_=PyRQIfaceType.MULTIPROCESSING_QUEUE)
    def testUnknownQueueType(self):
        XYZ = "xyz"
        assert XYZ not in [PyRQIfaceType.PYRQ, PyRQIfaceType.MULTIPROCESSING_QUEUE]
        try:
            PyRQIfaceFactory.get(type_=XYZ)