Xqt has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/692327 )
Change subject: [tests] Reflect keyword arguments when calling self.cache_output() ......................................................................
[tests] Reflect keyword arguments when calling self.cache_output()
Change-Id: If18a72f610e9e62e428188c074c3aaa60a8dc317 --- M pywikibot/userinterfaces/terminal_interface_base.py 1 file changed, 4 insertions(+), 3 deletions(-)
Approvals: Xqt: Verified; Looks good to me, approved
diff --git a/pywikibot/userinterfaces/terminal_interface_base.py b/pywikibot/userinterfaces/terminal_interface_base.py index 6b9a587..1ab775d 100755 --- a/pywikibot/userinterfaces/terminal_interface_base.py +++ b/pywikibot/userinterfaces/terminal_interface_base.py @@ -197,7 +197,7 @@ at termination time. """ print('>>> output:', text) - self.cache_output(text, toStdout, targetStream) + self.cache_output(text, toStdout=toStdout, targetStream=targetStream) if not self.lock.locked(): self.flush() print('<<< output:', text) @@ -209,8 +209,9 @@ print('######### SIZE is >0 but QUEUE is EMPTY #####') while not self.cache.empty(): args, kwargs = self.cache.get_nowait() - print('###', args) + print('##>', args) self.stream_output(*args, **kwargs) + print('##<') print('<<< flush:', self.cache.qsize())
def cache_output(self, *args, **kwargs): @@ -232,7 +233,7 @@
*New in version 6.2* """ - print('>>> stream_output:', text) + print('>>> stream_output:', text, file=sys.stdout, flush=True) if config.transliterate: # Encode our unicode string in the encoding used by the user's # console, and decode it back to unicode. Then we can see which