scipy_1.6_test_bytestring
authorDebian Science Maintainers <debian-science-maintainers@lists.alioth.debian.org>
Sun, 17 Jan 2021 14:02:15 +0000 (14:02 +0000)
committerDrew Parsons <dparsons@debian.org>
Sun, 17 Jan 2021 14:02:15 +0000 (14:02 +0000)
===================================================================

Gbp-Pq: Name scipy_1.6_test_bytestring.patch

statsmodels/tsa/arima/estimators/tests/test_gls.py

index ad91e4add2eaf812e70163edc81183fe209f2eb8..3d73bbf9eb96a6686082bb6977c66f5301323ec2 100644 (file)
@@ -1,8 +1,10 @@
 import numpy as np
+import scipy
 
 import pytest
 from numpy.testing import (
     assert_, assert_allclose, assert_equal, assert_warns, assert_raises)
+from packaging import version as pkg_version
 
 from statsmodels.tsa.arima.datasets.brockwell_davis_2002 import lake, oshorts
 from statsmodels.tsa.arima.estimators.gls import gls
@@ -203,5 +205,8 @@ def test_arma_kwargs():
     _, res2_imle = gls(endog, exog=exog, order=(1, 0, 1), n_iter=1,
                        arma_estimator_kwargs=arma_estimator_kwargs)
     assert_equal(res2_imle.arma_estimator_kwargs, arma_estimator_kwargs)
+    result_expected='CONVERGENCE: REL_REDUCTION_OF_F_<=_FACTR*EPSMCH'
+    if pkg_version.parse(scipy.version.version) < pkg_version.parse('1.6'):
+        result_expected=bytes(result_expected, 'utf-8')
     assert_equal(res2_imle.arma_results[1].minimize_results.message,
-                 b'CONVERGENCE: REL_REDUCTION_OF_F_<=_FACTR*EPSMCH')
+                 result_expected)