1 new commit in py:
https://bitbucket.org/hpk42/py/changeset/b2307ba5805f/ changeset: b2307ba5805f user: hpk42 date: 2011-12-20 08:50:13 summary: addresses issue10 - fix some of the failures on jython. affected #: 2 files diff -r 76dd97f88b789b6601363d3371456915ae38dbf0 -r b2307ba5805f75827cb1645ffbb70fda99a9192d testing/test_apipkg.py --- a/testing/test_apipkg.py +++ b/testing/test_apipkg.py @@ -3,6 +3,9 @@ import py import py._apipkg as apipkg import subprocess +import types + +ModuleType = types.ModuleType # # test support for importing modules # @@ -202,7 +205,7 @@ return ns def test_initpkg_replaces_sysmodules(monkeypatch): - mod = type(sys)('hello') + mod = ModuleType('hello') monkeypatch.setitem(sys.modules, 'hello', mod) apipkg.initpkg('hello', {'x': 'os.path:abspath'}) newmod = sys.modules['hello'] @@ -210,7 +213,7 @@ assert newmod.x == py.std.os.path.abspath def test_initpkg_transfers_attrs(monkeypatch): - mod = type(sys)('hello') + mod = ModuleType('hello') mod.__version__ = 10 mod.__file__ = "hello.py" mod.__loader__ = "loader" @@ -225,7 +228,7 @@ assert newmod.__doc__ == mod.__doc__ def test_initpkg_nodoc(monkeypatch): - mod = type(sys)('hello') + mod = ModuleType('hello') mod.__file__ = "hello.py" monkeypatch.setitem(sys.modules, 'hello', mod) apipkg.initpkg('hello', {}) @@ -233,7 +236,7 @@ assert not newmod.__doc__ def test_initpkg_overwrite_doc(monkeypatch): - hello = type(sys)('hello') + hello = ModuleType('hello') hello.__doc__ = "this is the documentation" monkeypatch.setitem(sys.modules, 'hello', hello) apipkg.initpkg('hello', {"__doc__": "sys:__doc__"}) @@ -242,7 +245,7 @@ assert newhello.__doc__ == sys.__doc__ def test_initpkg_not_transfers_not_existing_attrs(monkeypatch): - mod = type(sys)('hello') + mod = ModuleType('hello') mod.__file__ = "hello.py" monkeypatch.setitem(sys.modules, 'hello', mod) apipkg.initpkg('hello', {}) @@ -253,7 +256,7 @@ assert not hasattr(newmod, '__path__') def test_initpkg_defaults(monkeypatch): - mod = type(sys)('hello') + mod = ModuleType('hello') monkeypatch.setitem(sys.modules, 'hello', mod) apipkg.initpkg('hello', {}) newmod = sys.modules['hello'] diff -r 76dd97f88b789b6601363d3371456915ae38dbf0 -r b2307ba5805f75827cb1645ffbb70fda99a9192d tox.ini --- a/tox.ini +++ b/tox.ini @@ -20,7 +20,7 @@ [testenv:jython] changedir=testing commands= - {envpython} -m pytest --confcutdir=.. -rfsxX --junitxml={envlogdir}/junit-{envname}0.xml [io_ code] + {envpython} -m pytest --confcutdir=.. -rfsxX --junitxml={envlogdir}/junit-{envname}0.xml {posargs:io_ code} [testenv:external] deps= Repository URL: https://bitbucket.org/hpk42/py/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. _______________________________________________ py-svn mailing list py-svn@codespeak.net http://codespeak.net/mailman/listinfo/py-svn