8000 Ignore test-case on Python 3.12 · pythonnet/pythonnet@fb49470 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit fb49470

Browse files
committed
Ignore test-case on Python 3.12
1 parent 080d1bd commit fb49470

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

src/embed_tests/Codecs.cs

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -371,11 +371,23 @@ public void FloatDerivedDecoded()
371371
[Test]
372372
public void ExceptionDecodedNoInstance()
373373
{
374-
PyObjectConversions.RegisterDecoder(new InstancelessExceptionDecoder());
375-
using var scope = Py.CreateScope();
376-
var error = Assert.Throws<ValueErrorWrapper>(() => PythonEngine.Exec(
377-
$"[].__iter__().__next__()"));
378-
Assert.AreEqual(TestExceptionMessage, error.Message);
374+
if (Runtime.PyVersion < new Version(3, 12))
375+
{
376+
PyObjectConversions.RegisterDecoder(new InstancelessExceptionDecoder());
377+
using var scope = Py.CreateScope();
378+
379+
var error = Assert.Throws<ValueErrorWrapper>(() =>
380+
PythonEngine.Exec($"[].__iter__().__next__()")
381+
);
382+
Assert.AreEqual(TestExceptionMessage, error.Message);
383+
}
384+
else
385+
{
386+
Assert.Ignore(
387+
"This test does not work for Python 3.12, see " +
388+
"https://github.com/python/cpython/issues/101578"
389+
);
390+
}
379391
}
380392

381393
public static void AcceptsDateTime(DateTime v) {}

0 commit comments

Comments
 (0)
0