def test_output_options(self): am = arch_model(self.y_series) orig_stdout = sys.stdout try: sio = StringIO() sys.stdout = sio am.fit(disp=DISPLAY) sio.seek(0) output = sio.read() assert len(output) == 0 finally: sys.stdout = orig_stdout
def test_output_options(self): import sys from arch.compat.python import StringIO am = arch_model(self.y_series) orig_stdout = sys.stdout try: sio = StringIO() sys.stdout = sio res = am.fit(disp='final') sio.seek(0) print('SIO!') print(sio.read()) finally: sys.stdout = orig_stdout res = am.fit(disp='off')
def test_output_options(self): am = arch_model(self.y_series) orig_stdout = sys.stdout try: sio = StringIO() sys.stdout = sio am.fit(disp='final') sio.seek(0) print('SIO!') print(sio.read()) finally: sys.stdout = orig_stdout try: sio = StringIO() sys.stdout = sio am.fit(disp='off') sio.seek(0) output = sio.read() assert len(output) == 0 finally: sys.stdout = orig_stdout