@@ -3873,10 +3873,12 @@ class C(metaclass=CM):
3873
3873
def __init__ (self , b ):
3874
3874
pass
3875
3875
3876
- self .assertEqual (C (1 ), (2 , 1 ))
3877
- self .assertEqual (self .signature (C ),
3878
- ((('a' , ..., ..., "positional_or_keyword" ),),
3879
- ...))
3876
+ with self .assertWarns (FutureWarning ):
3877
+ self .assertEqual (C (1 ), (2 , 1 ))
3878
+ with self .assertWarns (FutureWarning ):
3879
+ self .assertEqual (self .signature (C ),
3880
+ ((('a' , ..., ..., "positional_or_keyword" ),),
3881
+ ...))
3880
3882
3881
3883
with self .subTest ('partialmethod' ):
3882
3884
class CM (type ):
@@ -4024,10 +4026,12 @@ class C:
4024
4026
class C :
4025
4027
__init__ = functools .partial (lambda x , a : None , 2 )
4026
4028
4027
- C (1 ) # does not raise
4028
- self .assertEqual (self .signature (C ),
4029
- ((('a' , ..., ..., "positional_or_keyword" ),),
4030
- ...))
4029
+ with self .assertWarns (FutureWarning ):
4030
+ C (1 ) # does not raise
4031
+ with self .assertWarns (FutureWarning ):
4032
+ self .assertEqual (self .signature (C ),
4033
+ ((('a' , ..., ..., "positional_or_keyword" ),),
4034
+ ...))
4031
4035
4032
4036
with self .subTest ('partialmethod' ):
4033
4037
class C :
@@ -4282,10 +4286,13 @@ class C:
4282
4286
class C :
4283
4287
__call__ = functools .partial (lambda x , a : (x , a ), 2 )
4284
4288
4285
- self .assertEqual (C ()(1 ), (2 , 1 ))
4286
- self .assertEqual (self .signature (C ()),
4287
- ((('a' , ..., ..., "positional_or_keyword" ),),
4288
- ...))
4289
+ c = C ()
4290
+ with self .assertWarns (FutureWarning ):
4291
+ self .assertEqual (c (1 ), (2 , 1 ))
4292
+ with self .assertWarns (FutureWarning ):
4293
+ self .assertEqual (self .signature (c ),
4294
+ ((('a' , ..., ..., "positional_or_keyword" ),),
4295
+ ...))
4289
4296
4290
4297
with self .subTest ('partialmethod' ):
4291
4298
class C :
0 commit comments