Remove tests of unsupported Python versions (#642)
This commit is contained in:
parent
1741a126b3
commit
ed7eefac6f
@ -1,6 +1,5 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import sys
|
|
||||||
from enum import (
|
from enum import (
|
||||||
EnumMeta,
|
EnumMeta,
|
||||||
IntEnum,
|
IntEnum,
|
||||||
@ -90,15 +89,8 @@ class EnumType(EnumMeta if TYPE_CHECKING else type):
|
|||||||
def __iter__(cls) -> Generator[Enum, None, None]:
|
def __iter__(cls) -> Generator[Enum, None, None]:
|
||||||
yield from cls._member_map_.values()
|
yield from cls._member_map_.values()
|
||||||
|
|
||||||
if sys.version_info >= (3, 8): # 3.8 added __reversed__ to dict_values
|
def __reversed__(cls) -> Generator[Enum, None, None]:
|
||||||
|
yield from reversed(cls._member_map_.values())
|
||||||
def __reversed__(cls) -> Generator[Enum, None, None]:
|
|
||||||
yield from reversed(cls._member_map_.values())
|
|
||||||
|
|
||||||
else:
|
|
||||||
|
|
||||||
def __reversed__(cls) -> Generator[Enum, None, None]:
|
|
||||||
yield from reversed(tuple(cls._member_map_.values()))
|
|
||||||
|
|
||||||
def __getitem__(cls, key: str) -> Enum:
|
def __getitem__(cls, key: str) -> Enum:
|
||||||
return cls._member_map_[key]
|
return cls._member_map_[key]
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import asyncio
|
import asyncio
|
||||||
import sys
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
import grpclib
|
import grpclib
|
||||||
@ -91,9 +90,6 @@ async def test_trailer_only_error_stream_unary(
|
|||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
@pytest.mark.skipif(
|
|
||||||
sys.version_info < (3, 8), reason="async mock spy does works for python3.8+"
|
|
||||||
)
|
|
||||||
async def test_service_call_mutable_defaults(mocker):
|
async def test_service_call_mutable_defaults(mocker):
|
||||||
async with ChannelFor([ThingService()]) as channel:
|
async with ChannelFor([ThingService()]) as channel:
|
||||||
client = ThingServiceClient(channel)
|
client = ThingServiceClient(channel)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user