Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tweepy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Zahra Rajabi
tweepy
Commits
300888b0
Commit
300888b0
authored
May 14, 2018
by
Hugo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unnecessary list literal - rewrite as a set literal
parent
b9304183
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
tests/test_rate_limit.py
tests/test_rate_limit.py
+2
-2
No files found.
tests/test_rate_limit.py
View file @
300888b0
...
...
@@ -15,7 +15,7 @@ class TweepyRateLimitTests(unittest.TestCase):
self
.
api
=
API
(
create_auth
())
self
.
api
.
retry_count
=
2
self
.
api
.
retry_delay
=
5
self
.
api
.
retry_errors
=
set
([
401
,
404
,
503
])
self
.
api
.
retry_errors
=
{
401
,
404
,
503
}
self
.
api
.
wait_on_rate_limit
=
True
def
testratelimit
(
self
):
...
...
@@ -26,7 +26,7 @@ class TweepyRateLimitTests(unittest.TestCase):
self
.
api
.
user_timeline
(
user_id
=
user_id
,
count
=
1
,
include_rts
=
True
)
except
TweepError
as
e
:
# continue if we're not autherized to access the user's timeline or she doesn't exist anymore
if
e
.
response
is
not
None
and
e
.
response
.
status
in
set
([
401
,
404
]):
if
e
.
response
is
not
None
and
e
.
response
.
status
in
{
401
,
404
}:
continue
raise
e
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment