mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-06-29 01:43:16 +03:00
Add NotImplementedError to coverage exclusion (#6057)
This commit is contained in:
parent
c5ab65923f
commit
0e10d32fb1
|
@ -25,5 +25,9 @@ known_first_party=rest_framework
|
||||||
source = .
|
source = .
|
||||||
include = rest_framework/*,tests/*
|
include = rest_framework/*,tests/*
|
||||||
branch = 1
|
branch = 1
|
||||||
|
|
||||||
[coverage:report]
|
[coverage:report]
|
||||||
include = rest_framework/*,tests/*
|
include = rest_framework/*,tests/*
|
||||||
|
exclude_lines =
|
||||||
|
pragma: no cover
|
||||||
|
raise NotImplementedError
|
||||||
|
|
|
@ -35,26 +35,26 @@ class ActionViewSet(GenericViewSet):
|
||||||
queryset = Action.objects.all()
|
queryset = Action.objects.all()
|
||||||
|
|
||||||
def list(self, request, *args, **kwargs):
|
def list(self, request, *args, **kwargs):
|
||||||
raise NotImplementedError() # pragma: no cover
|
raise NotImplementedError
|
||||||
|
|
||||||
def retrieve(self, request, *args, **kwargs):
|
def retrieve(self, request, *args, **kwargs):
|
||||||
raise NotImplementedError() # pragma: no cover
|
raise NotImplementedError
|
||||||
|
|
||||||
@action(detail=False)
|
@action(detail=False)
|
||||||
def list_action(self, request, *args, **kwargs):
|
def list_action(self, request, *args, **kwargs):
|
||||||
raise NotImplementedError() # pragma: no cover
|
raise NotImplementedError
|
||||||
|
|
||||||
@action(detail=False, url_name='list-custom')
|
@action(detail=False, url_name='list-custom')
|
||||||
def custom_list_action(self, request, *args, **kwargs):
|
def custom_list_action(self, request, *args, **kwargs):
|
||||||
raise NotImplementedError() # pragma: no cover
|
raise NotImplementedError
|
||||||
|
|
||||||
@action(detail=True)
|
@action(detail=True)
|
||||||
def detail_action(self, request, *args, **kwargs):
|
def detail_action(self, request, *args, **kwargs):
|
||||||
raise NotImplementedError() # pragma: no cover
|
raise NotImplementedError
|
||||||
|
|
||||||
@action(detail=True, url_name='detail-custom')
|
@action(detail=True, url_name='detail-custom')
|
||||||
def custom_detail_action(self, request, *args, **kwargs):
|
def custom_detail_action(self, request, *args, **kwargs):
|
||||||
raise NotImplementedError() # pragma: no cover
|
raise NotImplementedError
|
||||||
|
|
||||||
|
|
||||||
router = SimpleRouter()
|
router = SimpleRouter()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user