| 1 |
# Copyright 2015 gRPC authors. |
| 2 |
# |
| 3 |
# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 |
# you may not use this file except in compliance with the License. |
| 5 |
# You may obtain a copy of the License at |
| 6 |
# |
| 7 |
# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 |
# |
| 9 |
# Unless required by applicable law or agreed to in writing, software |
| 10 |
# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 |
# See the License for the specific language governing permissions and |
| 13 |
# limitations under the License. |
| 14 |
"""Governs coverage for tests of RPCs throughout RPC Framework.""" |
| 15 |
|
| 16 |
import abc |
| 17 |
|
| 18 |
# This code is designed for use with the unittest module. |
| 19 |
# pylint: disable=invalid-name |
| 20 |
|
| 21 |
|
| 22 |
class Coverage(abc.ABC): |
| 23 |
"""Specification of test coverage.""" |
| 24 |
|
| 25 |
@abc.abstractmethod |
| 26 |
def testSuccessfulUnaryRequestUnaryResponse(self): |
| 27 |
raise NotImplementedError() |
| 28 |
|
| 29 |
@abc.abstractmethod |
| 30 |
def testSuccessfulUnaryRequestStreamResponse(self): |
| 31 |
raise NotImplementedError() |
| 32 |
|
| 33 |
@abc.abstractmethod |
| 34 |
def testSuccessfulStreamRequestUnaryResponse(self): |
| 35 |
raise NotImplementedError() |
| 36 |
|
| 37 |
@abc.abstractmethod |
| 38 |
def testSuccessfulStreamRequestStreamResponse(self): |
| 39 |
raise NotImplementedError() |
| 40 |
|
| 41 |
@abc.abstractmethod |
| 42 |
def testSequentialInvocations(self): |
| 43 |
raise NotImplementedError() |
| 44 |
|
| 45 |
@abc.abstractmethod |
| 46 |
def testParallelInvocations(self): |
| 47 |
raise NotImplementedError() |
| 48 |
|
| 49 |
@abc.abstractmethod |
| 50 |
def testWaitingForSomeButNotAllParallelInvocations(self): |
| 51 |
raise NotImplementedError() |
| 52 |
|
| 53 |
@abc.abstractmethod |
| 54 |
def testCancelledUnaryRequestUnaryResponse(self): |
| 55 |
raise NotImplementedError() |
| 56 |
|
| 57 |
@abc.abstractmethod |
| 58 |
def testCancelledUnaryRequestStreamResponse(self): |
| 59 |
raise NotImplementedError() |
| 60 |
|
| 61 |
@abc.abstractmethod |
| 62 |
def testCancelledStreamRequestUnaryResponse(self): |
| 63 |
raise NotImplementedError() |
| 64 |
|
| 65 |
@abc.abstractmethod |
| 66 |
def testCancelledStreamRequestStreamResponse(self): |
| 67 |
raise NotImplementedError() |
| 68 |
|
| 69 |
@abc.abstractmethod |
| 70 |
def testExpiredUnaryRequestUnaryResponse(self): |
| 71 |
raise NotImplementedError() |
| 72 |
|
| 73 |
@abc.abstractmethod |
| 74 |
def testExpiredUnaryRequestStreamResponse(self): |
| 75 |
raise NotImplementedError() |
| 76 |
|
| 77 |
@abc.abstractmethod |
| 78 |
def testExpiredStreamRequestUnaryResponse(self): |
| 79 |
raise NotImplementedError() |
| 80 |
|
| 81 |
@abc.abstractmethod |
| 82 |
def testExpiredStreamRequestStreamResponse(self): |
| 83 |
raise NotImplementedError() |
| 84 |
|
| 85 |
@abc.abstractmethod |
| 86 |
def testFailedUnaryRequestUnaryResponse(self): |
| 87 |
raise NotImplementedError() |
| 88 |
|
| 89 |
@abc.abstractmethod |
| 90 |
def testFailedUnaryRequestStreamResponse(self): |
| 91 |
raise NotImplementedError() |
| 92 |
|
| 93 |
@abc.abstractmethod |
| 94 |
def testFailedStreamRequestUnaryResponse(self): |
| 95 |
raise NotImplementedError() |
| 96 |
|
| 97 |
@abc.abstractmethod |
| 98 |
def testFailedStreamRequestStreamResponse(self): |
| 99 |
raise NotImplementedError() |