Skip to content

Add support for running pytest from dotnet core 2.0 (dotnet <path>/netcoreapp2.0/nPython.dll) #590

Closed
@dmitriyse

Description

@dmitriyse

Environment

  • Pythonnet version: Any
  • Python version: Any
  • Operating System: Any

Details

  • Describe what you were trying to get done.

    pytest suite now works unly under Windows/Mono but not under .Net Core 2.0

  • What commands did you run to trigger this issue? If you can provide a
    Minimal, Complete, and Verifiable example
    this will help us understand the issue.

import sys
sys.path.append('/users/isys/icronyn/pyenvs/pythonnet/lib/python2.7/site-packages/pytest-2.9.1-py2.7.egg')
sys.path.append('/users/isys/icronyn/pyenvs/pythonnet/lib/python2.7/site-packages/py-1.4.31-py2.7.egg')
import pytest
pytest.main()
============================================================================== test session starts ==============================================================================
platform linux2 -- Python 2.7.5, pytest-2.9.1, py-1.4.31, pluggy-0.3.1
rootdir: /users/isys/icronyn/git/pythonnet, inifile: 
collected 376 items 

src/tests/test_array.py .....................................F..
src/tests/test_callback.py ..
src/tests/test_class.py .......F..F..FF...
src/tests/test_clrmethod.py FFFFF
src/tests/test_compat.py ......FFFF....F.
src/tests/test_constructors.py ....
src/tests/test_conversion.py ....................
src/tests/test_delegate.py ...
Unhandled Exception: System.MissingMethodException: Constructor on type 'System.Reflection.Emit.TypeBuilder' not found.
   at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   at System.Activator.CreateInstance(Type type, Object[] args)
   at Python.Runtime.DelegateManager.GetDelegate(Type dtype, IntPtr callable) in /users/isys/icronyn/git/pythonnet/src/runtime/delegatemanager.cs:line 159
   at Python.Runtime.DelegateObject.tp_new(IntPtr tp, IntPtr args, IntPtr kw) in /users/isys/icronyn/git/pythonnet/src/runtime/delegateobject.cs:line 61
   at Python.Runtime.MetaType.tp_call(IntPtr tp, IntPtr args, IntPtr kw) in /users/isys/icronyn/git/pythonnet/src/runtime/metatype.cs:line 148
   at Python.Runtime.Runtime.Py_Main(Int32 argc, String[] argv)
   at Python.Runtime.PythonConsole.Main(String[] args) in /users/isys/icronyn/git/pythonnet/src/console/pythonconsole.cs:line 37
Aborted

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions