Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecated twisted.internet.defer.TimeoutError in favor of twisted.internet.error.TimeoutError #261

Closed
wants to merge 13 commits into from

Conversation

rodrigc
Copy link
Contributor

@rodrigc rodrigc commented Jun 29, 2016

@@ -25,10 +25,12 @@
from functools import wraps

# Twisted imports
import twisted.internet.error
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to have shorter named in the rest of the code I think that we should just do

from twisted.internet import error 

@@ -2357,7 +2357,7 @@ def test_waitUntilLockedWithTimeoutUnlocked(self):
but the lock is unlocked before our timeout.
"""
def onTimeout(f):
f.trap(defer.TimeoutError)
f.trap(error.TimeoutError)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here is a missing coverage which will block the merge :(

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do I test that? That code is inside a test that is supposed to be testing a condition that is never supposed to happen.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question :)

I would say that we should have a # pragma: no-cover comment to let coverage know that this line should be ignored

... but first, let's talk about it over the mailing list. I will start the conversation :)

Thanks!

@rodrigc
Copy link
Contributor Author

rodrigc commented Jul 6, 2016

Closing, as per feedback in
http://twistedmatrix.com/trac/ticket/8533

@rodrigc rodrigc closed this Jul 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants