Commit 0710b467 authored by Stefan Behnel's avatar Stefan Behnel

fix previously extended test after removing the ABC patching

parent 7cad6432
# mode: run # mode: run
# tag: generators # tag: generators
try:
import backports_abc
except ImportError: pass
else: backports_abc.patch()
try: try:
from collections.abc import Generator from collections.abc import Generator
except ImportError: except ImportError:
from collections import Generator try:
from collections import Generator
except ImportError:
Generator = object # easy win
def very_simple(): def very_simple():
...@@ -483,7 +491,10 @@ def test_generator_abc(): ...@@ -483,7 +491,10 @@ def test_generator_abc():
>>> try: >>> try:
... from collections.abc import Generator ... from collections.abc import Generator
... except ImportError: ... except ImportError:
... from collections import Generator ... try:
... from collections import Generator
... except ImportError:
... Generator = object # easy win
>>> isinstance(test_generator_abc(), Generator) >>> isinstance(test_generator_abc(), Generator)
True True
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment