|
@@ -67,11 +67,10 @@ class TestSt:
|
|
|
print("无法获取Token")
|
|
|
return None
|
|
|
|
|
|
- def __init__(self, tid, message_receiver=None, begin_callback=None):
|
|
|
+ def __init__(self, tid, message_receiver=None):
|
|
|
self.__th = threading.Thread(target=self.__test_run)
|
|
|
self.__id = tid
|
|
|
self.message_receiver = message_receiver
|
|
|
- self.begin_callback = begin_callback
|
|
|
self._Token = self.get_cached_token()
|
|
|
self.sr = None
|
|
|
print("开始")
|
|
@@ -111,9 +110,9 @@ class TestSt:
|
|
|
|
|
|
def test_on_sentence_begin(self, message, *args):
|
|
|
# pass
|
|
|
- print("test_on_sentence_begin:{}".format(message))
|
|
|
- if self.begin_callback:
|
|
|
- self.begin_callback(message, *args)
|
|
|
+ # print("test_on_sentence_begin:{}".format(message))
|
|
|
+ if self.message_receiver:
|
|
|
+ self.message_receiver(message, *args)
|
|
|
|
|
|
def test_on_sentence_end(self, message, *args):
|
|
|
# print("test_on_sentence_end:{}".format(message))
|