Do not use type(sys)('hello') for compatibility with Jython

Issue #2 resolved
Arfrever Frehtes Taifersar Arahesis
created an issue

Some tests in test_apipkg.py use type(sys)('hello'), which does not work in Jython. I suggest to use type(os)('hello') or types.ModuleType('hello').

In Jython: {{{

import os, sys, types type(os) <type 'module'> type(sys) <type '<reflected field public org.python.core.PyObject org.python.core.PySystemState.name at 0x1>'> type(os)('hello') <module 'hello' (built-in)> type(sys)('hello') Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: systemstate(): expected 0 args; got 1 types.ModuleType('hello') <module 'hello' (built-in)> }}}

Comments (1)

  1. Log in to comment