@@ -178,9 +178,9 @@ def listener(undo, do, prev):
178
178
179
179
t .add_listener (listener )
180
180
181
- expected = [([Translation ([stroke ('S' )], dc )],
182
- [Translation ([stroke ('S' ), stroke ('P' )], dc )],
183
- Translation ([stroke ('T' )], dc ))]
181
+ expected = [([Translation ([stroke ('S' )], None )],
182
+ [Translation ([stroke ('S' ), stroke ('P' )], 'hi' )],
183
+ Translation ([stroke ('T' )], None ))]
184
184
t .translate (stroke ('P' ))
185
185
self .assertEqual (output , expected )
186
186
@@ -192,15 +192,15 @@ def listener(undo, do, prev):
192
192
del output [:]
193
193
t .clear_state ()
194
194
t .translate (stroke ('P' ))
195
- self .assertEqual (output , [([], [Translation ([stroke ('P' )], dc )], None )])
195
+ self .assertEqual (output , [([], [Translation ([stroke ('P' )], None )], None )])
196
196
197
197
del output [:]
198
198
t .set_state (s )
199
199
t .translate (stroke ('P' ))
200
200
self .assertEqual (output ,
201
201
[([],
202
- [Translation ([stroke ('P' )], dc )],
203
- Translation ([stroke ('S' ), stroke ('P' )], dc ))])
202
+ [Translation ([stroke ('P' )], None )],
203
+ Translation ([stroke ('S' ), stroke ('P' )], 'hi' ))])
204
204
205
205
def test_translator (self ):
206
206
@@ -335,10 +335,9 @@ def clear(self):
335
335
class StateTestCase (unittest .TestCase ):
336
336
337
337
def setUp (self ):
338
- d = StenoDictionaryCollection ()
339
- self .a = Translation ([stroke ('S' )], d )
340
- self .b = Translation ([stroke ('T' ), stroke ('-D' )], d )
341
- self .c = Translation ([stroke ('-Z' ), stroke ('P' ), stroke ('T*' )], d )
338
+ self .a = Translation ([stroke ('S' )], None )
339
+ self .b = Translation ([stroke ('T' ), stroke ('-D' )], None )
340
+ self .c = Translation ([stroke ('-Z' ), stroke ('P' ), stroke ('T*' )], None )
342
341
343
342
def test_last_list0 (self ):
344
343
s = _State ()
0 commit comments