Add NotImplementedError to coverage exclusion (#6057)

This commit is contained in:
Ryan P Kilby 2018-06-24 17:56:31 -04:00 committed by GitHub
parent c5ab65923f
commit 0e10d32fb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 6 deletions

View File

@ -25,5 +25,9 @@ known_first_party=rest_framework
source = .
include = rest_framework/*,tests/*
branch = 1
[coverage:report]
include = rest_framework/*,tests/*
exclude_lines =
pragma: no cover
raise NotImplementedError

View File

@ -35,26 +35,26 @@ class ActionViewSet(GenericViewSet):
queryset = Action.objects.all()
def list(self, request, *args, **kwargs):
raise NotImplementedError() # pragma: no cover
raise NotImplementedError
def retrieve(self, request, *args, **kwargs):
raise NotImplementedError() # pragma: no cover
raise NotImplementedError
@action(detail=False)
def list_action(self, request, *args, **kwargs):
raise NotImplementedError() # pragma: no cover
raise NotImplementedError
@action(detail=False, url_name='list-custom')
def custom_list_action(self, request, *args, **kwargs):
raise NotImplementedError() # pragma: no cover
raise NotImplementedError
@action(detail=True)
def detail_action(self, request, *args, **kwargs):
raise NotImplementedError() # pragma: no cover
raise NotImplementedError
@action(detail=True, url_name='detail-custom')
def custom_detail_action(self, request, *args, **kwargs):
raise NotImplementedError() # pragma: no cover
raise NotImplementedError
router = SimpleRouter()