Improve 3.x forelselast coverage

This commit is contained in:
rocky
2017-12-02 08:53:11 -05:00
parent ac819cd1b9
commit 28e573b73c
7 changed files with 22 additions and 0 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,22 @@
# From python 3.4 asyncio/base_events.py
# Needs a forelselast grammar rule
def create_connection(self, infos, f2, laddr_infos, protocol):
for family in infos:
try:
if f2:
for laddr in laddr_infos:
try:
break
except OSError:
protocol = 'foo'
else:
continue
except OSError:
protocol = 'bar'
else:
break
else:
raise
return protocol