Author: marky1991 <marky1...@gmail.com> Branch: py3.3 Changeset: r81724:6efa96d1fbb3 Date: 2016-01-10 23:48 -0500 http://bitbucket.org/pypy/pypy/changeset/6efa96d1fbb3/
Log: Cleanup handling of __loader__ in test_mod diff --git a/pypy/module/_io/test/test_io.py b/pypy/module/_io/test/test_io.py --- a/pypy/module/_io/test/test_io.py +++ b/pypy/module/_io/test/test_io.py @@ -391,18 +391,13 @@ def test_mod(self): import _io, _frozen_importlib - typemods = dict((t, t.__module__) for t in vars(_io).values() - if isinstance(t, type)) + typemods = dict((t, t.__module__) for name, t in vars(_io).items() + if isinstance(t, type) and name != '__loader__') for t, mod in typemods.items(): if t is _io.BlockingIOError: assert mod == 'builtins' elif t is _io.UnsupportedOperation: assert mod == 'io' - #TODO: Make sure this is a reasonable thing to do. Check if there is - #a cleaner way to do these checks or if these checks even make sense - #in general. They seem really brittle. - elif t is _frozen_importlib.BuiltinImporter: - assert mod == "_frozen_importlib" else: assert mod == '_io' _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit