From f7a32a60a286d30be4e6e1f662047b839e768528 Mon Sep 17 00:00:00 2001 From: Harmon Date: Sun, 25 Aug 2019 03:38:22 -0500 Subject: [PATCH] Fix Cursor set start test Update subclasses of BaseIterator to modify the kwargs attribute rather than the local variable --- tweepy/cursor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tweepy/cursor.py b/tweepy/cursor.py index 48b3477..1803c37 100644 --- a/tweepy/cursor.py +++ b/tweepy/cursor.py @@ -60,7 +60,7 @@ class CursorIterator(BaseIterator): def __init__(self, method, *args, **kwargs): BaseIterator.__init__(self, method, *args, **kwargs) - start_cursor = kwargs.pop('cursor', None) + start_cursor = self.kwargs.pop('cursor', None) self.next_cursor = start_cursor or -1 self.prev_cursor = start_cursor or 0 self.num_tweets = 0 @@ -91,7 +91,7 @@ class IdIterator(BaseIterator): def __init__(self, method, *args, **kwargs): BaseIterator.__init__(self, method, *args, **kwargs) - self.max_id = kwargs.pop('max_id', None) + self.max_id = self.kwargs.pop('max_id', None) self.num_tweets = 0 self.results = [] self.model_results = [] -- 2.25.1