File tree Expand file tree Collapse file tree 1 file changed +4
-12
lines changed
Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -3358,20 +3358,12 @@ def test_path_t_converter(self):
33583358 fn (fd , * extra_args )
33593359
33603360 def test_path_t_converter_and_custom_class (self ):
3361- with self .assertRaisesRegex (
3362- TypeError ,
3363- '__fspath__\(\) to return str or bytes, not int'
3364- ):
3361+ msg = r'__fspath__\(\) to return str or bytes, not %s'
3362+ with self .assertRaisesRegex (TypeError , msg % r'int' ):
33653363 os .stat (FakePath (2 ))
3366- with self .assertRaisesRegex (
3367- TypeError ,
3368- '__fspath__\(\) to return str or bytes, not float'
3369- ):
3364+ with self .assertRaisesRegex (TypeError , msg % r'float' ):
33703365 os .stat (FakePath (2.34 ))
3371- with self .assertRaisesRegex (
3372- TypeError ,
3373- '__fspath__\(\) to return str or bytes, not object'
3374- ):
3366+ with self .assertRaisesRegex (TypeError , msg % r'object' ):
33753367 os .stat (FakePath (object ()))
33763368
33773369
You can’t perform that action at this time.
0 commit comments