- Notifications
You must be signed in to change notification settings - Fork749
Closed
Description
Environment
- Pythonnet version: 2.5.0
- Python version: 3.7
- Operating System: Windows
Details
All .NET class instances are considered instances ofcollections.abc.Iterable
.
namespacePython.Test{publicclassEmpty{}}
deftest_not_Iterable():"""Test regular .NET objects are not iterable"""fromPython.TestimportEmptyfromcollections.abcimportIterableassert (notisinstance(Empty(),Iterable))
The test is expected to pass, but fails:
def test_not_Iterable(): """Test regular .NET objects are not iterable""" from Python.Test import Empty from collections.abc import Iterable> assert (not isinstance(Empty(), Iterable))E AssertionError: assert not TrueE + where True = isinstance(<Python.Test.Empty object at 0x0000022D3E6DE5C8>, <class 'collections.abc.Iterable'>)E + where <Python.Test.Empty object at 0x0000022D3E6DE5C8> = <class 'Python.Test.Empty'>()
Metadata
Metadata
Assignees
Labels
No labels