File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 1+ import sys
12from threading import Thread
23
34from pytest import raises
@@ -73,16 +74,17 @@ class BasicThing(Thing):
7374
7475def test_instantiation_with_type_and_model ():
7576 """If a model is specified, we check it matches the inferred type."""
77+ old_python = sys .version_info < (3 , 11 )
7678
7779 class BasicThing (Thing ):
7880 prop = ThingProperty [bool ](model = bool , initial_value = False )
7981
80- with pytest .raises (MismatchedTypeError ):
82+ with pytest .raises (RuntimeError if old_python else MismatchedTypeError ):
8183
8284 class InvalidThing (Thing ):
8385 prop = ThingProperty [bool ](model = int , initial_value = False )
8486
85- with pytest .raises (MissingTypeError ):
87+ with pytest .raises (RuntimeError if old_python else MissingTypeError ):
8688
8789 class InvalidThing (Thing ):
8890 prop = ThingProperty (model = bool , initial_value = False )
You can’t perform that action at this time.
0 commit comments