Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions pytest_trio/_tests/test_async_yield_fixture.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,14 @@
@pytest.fixture(params=['Python>=36', 'async_generator'])
def async_yield_implementation(request):
if request.param == 'Python>=36':
if sys.version_info < (3, 6):
pytest.skip("requires python3.6")
else:

def patch_code(code):
# Convert code to use Python>=3.6 builtin async generator
code = re.sub(r'(?m)^\s*@async_generator\n', r'', code)
code = re.sub(r'await yield_', r'yield', code)
return code
def patch_code(code):
# Convert code to use Python>=3.6 builtin async generator
code = re.sub(r'(?m)^\s*@async_generator\n', r'', code)
code = re.sub(r'await yield_', r'yield', code)
return code

return patch_code
return patch_code
else:
return lambda x: x

Expand Down
6 changes: 0 additions & 6 deletions pytest_trio/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@
# Basic setup
################################################################

if sys.version_info >= (3, 6):
ORDERED_DICTS = True
else:
# Ordered dict (and **kwargs) not available with Python<3.6
ORDERED_DICTS = False

try:
from hypothesis import register_random
except ImportError: # pragma: no cover
Expand Down