More tests, coverage, and excluding lines from being covered
There are some lines that will never be hit in tests, excluding those from being covered!
This commit is contained in:
parent
00c0bd91a6
commit
acdf73a04e
6 changed files with 45 additions and 10 deletions
|
|
@ -132,13 +132,13 @@ class TwythonStreamer(object):
|
|||
if is_py3:
|
||||
line = line.decode('utf-8')
|
||||
data = json.loads(line)
|
||||
if self.on_success(data):
|
||||
if self.on_success(data): # pragma: no cover
|
||||
for message_type in self.handlers:
|
||||
if message_type in data:
|
||||
handler = getattr(self, 'on_' + message_type, None)
|
||||
if handler and callable(handler) and not handler(data.get(message_type)):
|
||||
break
|
||||
except ValueError:
|
||||
except ValueError: # pragma: no cover
|
||||
self.on_error(response.status_code, 'Unable to decode response, not valid JSON.')
|
||||
|
||||
response.close()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue