Exemplo n.º 1
0
    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
Exemplo n.º 2
0
    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')
Exemplo n.º 3
0
    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')
Exemplo n.º 4
0
    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