comparison tests/test-sshserver.py @ 41285:cf8677cd7286

ui: proxy protect/restorestdio() calls to update internal flag It should be better to manage the redirection flag solely by the ui class.
author Yuya Nishihara <yuya@tcha.org>
date Wed, 26 Sep 2018 21:41:52 +0900
parents b4d85bc122bd
children 2372284d9457
comparison
equal deleted inserted replaced
41284:b0e3f2d7c143 41285:cf8677cd7286
45 def __init__(self, inbytes): 45 def __init__(self, inbytes):
46 self.fin = io.BytesIO(inbytes) 46 self.fin = io.BytesIO(inbytes)
47 self.fout = io.BytesIO() 47 self.fout = io.BytesIO()
48 self.ferr = io.BytesIO() 48 self.ferr = io.BytesIO()
49 49
50 def protectfinout(self):
51 return self.fin, self.fout
52
53 def restorefinout(self, fin, fout):
54 pass
55
50 if __name__ == '__main__': 56 if __name__ == '__main__':
51 # Don't call into msvcrt to set BytesIO to binary mode 57 # Don't call into msvcrt to set BytesIO to binary mode
52 procutil.setbinary = lambda fp: True 58 procutil.setbinary = lambda fp: True
53 silenttestrunner.main(__name__) 59 silenttestrunner.main(__name__)