Skip to content

Commit

Permalink
Fix coverage drop
Browse files Browse the repository at this point in the history
  • Loading branch information
macisamuele committed Jun 25, 2018
1 parent 8eb4e61 commit 2178e9f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ exclude_lines =
raise AssertionError
raise NotImplementedError
if __name__ == .__main__.:
pragma: no cover
@bottle.(get|post|route)
20 changes: 12 additions & 8 deletions bravado/testing/integration_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ def _response_getter(future, timeout):

return _response_getter

raise ValueError
raise ValueError # pragma: no cover


class IntegrationTestingFixturesMixin(IntegrationTestingServicesAndClient):
Expand All @@ -282,23 +282,27 @@ class IntegrationTestingFixturesMixin(IntegrationTestingServicesAndClient):
@classmethod
def setup_class(cls):
if cls.http_client_type is None:
raise RuntimeError(
'Define http_client_type for {}'.format(cls.__name__))
raise RuntimeError( # pragma: no cover
'Define http_client_type for {}'.format(cls.__name__)
)
if cls.http_future_adapter_type is None:
raise RuntimeError(
'Define http_future_adapter_type for {}'.format(cls.__name__))
raise RuntimeError( # pragma: no cover
'Define http_future_adapter_type for {}'.format(cls.__name__)
)
if cls.connection_errors_exceptions is None:
raise RuntimeError(
raise RuntimeError( # pragma: no cover
'Define connection_errors_exceptions for {}'.format(
cls.__name__))
cls.__name__,
),
)
cls.http_client = cls.http_client_type()

@classmethod
def encode_expected_response(cls, response):
if isinstance(response, bytes):
return response.decode('utf-8')
else:
return str(response)
return str(response) # pragma: no cover

def cancel_http_future(self, http_future):
pass
Expand Down

0 comments on commit 2178e9f

Please sign in to comment.