@@ -112,7 +112,7 @@ def test_view_text(self):
112112 view .ok ()
113113
114114 def test_view_file (self ):
115- view = tv .view_file (root , 'Title' , __file__ , modal = False )
115+ view = tv .view_file (root , 'Title' , __file__ , 'ascii' , modal = False )
116116 self .assertIsInstance (view , tv .ViewWindow )
117117 self .assertIsInstance (view .viewframe , tv .ViewFrame )
118118 get = view .viewframe .textframe .text .get
@@ -121,7 +121,7 @@ def test_view_file(self):
121121
122122 def test_bad_file (self ):
123123 # Mock showerror will be used; view_file will return None.
124- view = tv .view_file (root , 'Title' , 'abc.xyz' , modal = False )
124+ view = tv .view_file (root , 'Title' , 'abc.xyz' , 'ascii' , modal = False )
125125 self .assertIsNone (view )
126126 self .assertEqual (tv .showerror .title , 'File Load Error' )
127127
@@ -161,7 +161,8 @@ def _command():
161161 def test_view_file_bind_with_button (self ):
162162 def _command ():
163163 self .called = True
164- self .view = tv .view_file (root , 'TITLE_FILE' , __file__ , _utest = True )
164+ self .view = tv .view_file (root , 'TITLE_FILE' , __file__ ,
165+ encoding = 'ascii' , _utest = True )
165166 button = Button (root , text = 'BUTTON' , command = _command )
166167 button .invoke ()
167168 self .addCleanup (button .destroy )
0 commit comments