File tree 1 file changed +17
-5
lines changed
1 file changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -371,11 +371,23 @@ public void FloatDerivedDecoded()
371
371
[ Test ]
372
372
public void ExceptionDecodedNoInstance ( )
373
373
{
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
+ }
379
391
}
380
392
381
393
public static void AcceptsDateTime ( DateTime v ) { }
You can’t perform that action at this time.
0 commit comments