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

All Samples(5)  |  Call(4)  |  Derive(0)  |  Import(1)

src/m/o/MockMockMock-0.4.0/MockMockMock/_Details/ExpectationHandler.py   MockMockMock(Download)
# You should have received a copy of the GNU Lesser General Public License along with MockMockMock.  If not, see <http://www.gnu.org/licenses/>.
from MockException import MockException
from Expectation import Expectation
import ArgumentChecking
        if len(goodNamedExpectations) == 0:
            raise MockException(calledName + " called instead of " + " or ".join(e.name for e in possibleExpectations))
        allGoodNamedExpectationsExpectNoCall = not any(expectation.expectsCall() for expectation in goodNamedExpectations)
            return self.__callExpectation(goodNamedExpectations[0])
            raise MockException(calledName + " is expected as a property and as a method call in an unordered group")
    def checkExpectationCall(self, expectations, args, kwds):
        for expectation in expectations:
            if expectation.checkCall(args, kwds):
                return self.__callExpectation(expectation)
        raise MockException(expectations[0].name + " called with bad arguments " + str(args) + " " + str(kwds))
    def tearDown(self):
        if self.__currentGroup.requiresMoreCalls():
            raise MockException(" or ".join(self.__currentGroup.getRequiredCallsExamples()) + " not called")