The installed pytest and py are: pytest-2.0.3-py2.7, py-1.4.3-py2.7

I'm providing the relevant method from py-1.4.3-py27.egg/py/_apipkg.py:
Line 33 is: mod = ApiModule(pkgname, exportdefs, implprefix=pkgname, attr=d)

def initpkg(pkgname, exportdefs, attr=dict()):
    """ initialize given package from the export definitions. """
    oldmod = sys.modules.get(pkgname)
    d = {}
    f = getattr(oldmod, '__file__', None)
    if f:
        f = os.path.abspath(f)
    d['__file__'] = f
    if hasattr(oldmod, '__version__'):
        d['__version__'] = oldmod.__version__
    if hasattr(oldmod, '__loader__'):
        d['__loader__'] = oldmod.__loader__
    if hasattr(oldmod, '__path__'):
        d['__path__'] = [os.path.abspath(p) for p in oldmod.__path__]
    if '__doc__' not in exportdefs and getattr(oldmod, '__doc__', None):
        d['__doc__'] = oldmod.__doc__
    d.update(attr)
    if hasattr(oldmod, "__dict__"):
        oldmod.__dict__.update(d)
    mod = ApiModule(pkgname, exportdefs, implprefix=pkgname, attr=d)
    sys.modules[pkgname]  = mod

________________________________________
Från: users-boun...@lists.ironpython.com [users-boun...@lists.ironpython.com] 
för Dino Viehland [di...@microsoft.com]
Skickat: den 12 maj 2011 23:08
Till: Discussion of IronPython
Ämne: Re: [IronPython] pytest results in unsupported PythonDictionary system    
error

Piotr wrote:
> Hi
>
> This is for IronPython 2.7
> Pytest 2.0.3 installed in site-packages
>
> Running a test with pytest results in the following system error:
> SystemError: Unsupported param dictionary type:
> IronPython.Runtime.PythonDictionary
>
> Any ideas what the problem is?
>
> ----------------------------------------------
> Here is the example and the error:
>
> class TestBasic:
>     def test_01(self):
>         for n in (2, 4, 6, 8, 10):
>             yield self.n_greater_than_zero, n
>
>     def n_greater_than_zero(self, n):
>         assert n > 0
>
> if __name__ == '__main__':
>     import pytest
>     pytest.main()
>
> C:\IronPython\ipy.exe .\test_001_dd.py
> Traceback (most recent call last):
>   File ".\test_001_dd.py", line 11, in <module>
>   File "C:\IronPython\lib\site-packages\pytest.py", line 6, in <module>
>   File "C:\IronPython\lib\site-packages\_pytest\core.py", line 7, in <module>
>   File "C:\IronPython\lib\site-packages\py\__init__.py", line 19, in <module>
>   File "C:\IronPython\lib\site-packages\py\_apipkg.py", line 33, in initpkg
> SystemError: Unsupported param dictionary type:
> IronPython.Runtime.PythonDictionary

Can you send the code in _apipkg.py on line 33 (and maybe some surrounding 
code)?

Anyway, it sounds like a binder bug but that code might help create a simple 
repro.
_______________________________________________
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
_______________________________________________
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to