def limit(self, limit):
        if not isinstance(limit, (int, long)):
            raise TypeError("limit must be an integer")
        if self.__exhaust:
            raise InvalidOperation("Can't use limit and exhaust together.")
        self.__check_okay_to_chain()

        self.__empty = False
        self.__limit = limit
        return self
tests the reset method
dataset/ETHPy150Open blynch/CloudMemeBackend/pymongo/cursor.py/Cursor.limit--crossover with--dataset/ETHPy150Open Axelrod-Python/Axelrod/axelrod/tests/unit/test_grumpy.py/TestGrumpy.test_reset_method