8000 Remove tests of unsupported Python versions (#642) · AdrienVannson/python-betterproto@ed7eefa · GitHub
[go: up one dir, main page]

Skip to content

Commit ed7eefa

Browse files
Remove tests of unsupported Python versions (danielgtaylor#642)
1 parent 1741a12 commit ed7eefa

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

src/betterproto/enum.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from __future__ import annotations
22

3-
import sys
43
from enum import (
54
EnumMeta,
65
IntEnum,
@@ -90,15 +89,8 @@ def __call__(cls, value: int) -> Enum:
9089
def __iter__(cls) -> Generator[Enum, None, None]:
9190
yield from cls._member_map_.values()
9291

93-
if sys.version_info >= (3, 8): # 3.8 added __reversed__ to dict_values
94-
95-
def __reversed__(cls) -> Generator[Enum, None, None]:
96-
yield from reversed(cls._member_map_.values())
97-
98-
else:
99-
100-
def __reversed__(cls) -> Generator[Enum, None, None]:
101-
yield from reversed(tuple(cls._member_map_.values()))
92+
def __reversed__(cls) -> Generator[Enum, None, None]:
93+
yield from reversed(cls._member_map_.values())
10294

10395
def __getitem__(cls, key: str) -> Enum:
10496
return cls._member_map_[key]

tests/grpc/test_grpclib_client.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import asyncio
2-
import sys
32
import uuid
43

54
import grpclib
@@ -91,9 +90,6 @@ async def test_trailer_only_error_stream_unary(
9190

9291

9392
@pytest.mark.asyncio
94-
@pytest.mark.skipif(
95-
sys.version_info < (3, 8), reason="async mock spy does works for python3.8+"
96-
)
9793
async def test_service_call_mutable_defaults(mocker):
9894
async with ChannelFor([ThingService()]) as channel:
9995
client = ThingServiceClient(channel)

0 commit comments

Comments
 (0)
0