File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed
Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -371,11 +371,20 @@ 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 ( "Apparently there are no 'instance-less' exceptions in Python 3.12" ) ;
387+ }
379388 }
380389
381390 public static void AcceptsDateTime ( DateTime v ) { }
You can’t perform that action at this time.
0 commit comments