File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -3572,13 +3572,13 @@ class P(Protocol):
35723572 self .assertEqual (Alias , Alias2 )
35733573
35743574 def test_protocols_pickleable (self ):
3575- global GlobalProto , CP # pickle wants to reference the class by name
3575+ global P , CP # pickle wants to reference the class by name
35763576 T = TypeVar ('T' )
35773577
35783578 @runtime_checkable
3579- class GlobalProto (Protocol [T ]):
3579+ class P (Protocol [T ]):
35803580 x = 1
3581- class CP (GlobalProto [int ]):
3581+ class CP (P [int ]):
35823582 pass
35833583
35843584 c = CP ()
@@ -3591,7 +3591,7 @@ class CP(GlobalProto[int]):
35913591 self .assertEqual (x .bar , 'abc' )
35923592 self .assertEqual (x .x , 1 )
35933593 self .assertEqual (x .__dict__ , {'foo' : 42 , 'bar' : 'abc' })
3594- s = pickle .dumps (GlobalProto )
3594+ s = pickle .dumps (P )
35953595 D = pickle .loads (s )
35963596 class E :
35973597 x = 1
You can’t perform that action at this time.
0 commit comments