10
10
11
11
12
12
13
- class FakeCanvas :
13
+ class Canvas :
14
14
15
15
def __init__ (self , * args , ** kwargs ):
16
16
self .init_args = mock .call (* args , ** kwargs )
@@ -31,7 +31,7 @@ def __init__(self, *args, **kwargs):
31
31
32
32
33
33
34
- class FakeWindow :
34
+ class Window :
35
35
36
36
def __init__ (self , screen_width , screen_height ):
37
37
self .winfo_screenwidth = mock .Mock (return_value = screen_width )
@@ -76,15 +76,15 @@ def winfo_height(self):
76
76
return self ._h
77
77
78
78
79
- class FakeTk ( FakeWindow ):
79
+ class Tk ( Window ):
80
80
pass
81
81
82
82
83
- class FakeToplevel ( FakeWindow ):
83
+ class Toplevel ( Window ):
84
84
pass
85
85
86
86
87
- class FakePhotoImage :
87
+ class PhotoImage :
88
88
89
89
def __init__ (self ):
90
90
self .copies = 0
@@ -97,11 +97,11 @@ def __init__(self):
97
97
98
98
def copy (self ):
99
99
self .copies += 1
100
- return FakePhotoImage ()
100
+ return PhotoImage ()
101
101
102
102
103
103
104
- class FakeTkinter :
104
+ class Module :
105
105
106
106
def __init__ (self , screen_width , screen_height ):
107
107
self .screen_width = screen_width
@@ -111,20 +111,20 @@ def __init__(self, screen_width, screen_height):
111
111
self .photoimage_init_calls = []
112
112
113
113
def Tk (self ):
114
- window = FakeTk (self .screen_width , self .screen_height )
114
+ window = Tk (self .screen_width , self .screen_height )
115
115
self .windows .append (window )
116
116
return window
117
117
118
118
def Toplevel (self ):
119
- window = FakeToplevel (self .screen_width , self .screen_height )
119
+ window = Toplevel (self .screen_width , self .screen_height )
120
120
self .windows .append (window )
121
121
return window
122
122
123
123
def Canvas (self , * args , ** kwargs ):
124
- canvas = FakeCanvas (* args , ** kwargs )
124
+ canvas = Canvas (* args , ** kwargs )
125
125
self .canvases .append (canvas )
126
126
return canvas
127
127
128
128
def PhotoImage (self , * args , ** kwargs ):
129
129
self .photoimage_init_calls .append ((args , kwargs ))
130
- return FakePhotoImage ()
130
+ return PhotoImage ()
0 commit comments