1ead4fe94cc00561467641317befbc26a594933a,pmdarima/arima/tests/test_arima.py,,test_for_older_version,#,817
Before Change
// Pickle it
pickle_file = "model.pkl"
try:
joblib.dump(arima, pickle_file)
// Now unpickle it and show that we get a warning (if expected)
if expect_warning:
with pytest.warns(UserWarning):
arm = joblib.load(pickle_file) // type: ARIMA
else:
arm = joblib.load(pickle_file) // type: ARIMA
// we can still produce predictions (only if we fit)
if do_fit:
arm.predict(n_periods=4)
finally:
os.unlink(pickle_file)
@pytest.mark.parametrize(
"order,seasonal", [
// ARMA
pytest.param((1, 0, 0), (0, 0, 0, 0)),
After Change
elif case == 3:
arima.pkg_version_ = "0.0.1" // will always be < than current
with tempfile.TemporaryDirectory() as tdir:
pickle_file = os.path.join(tdir, "model.pkl")
joblib.dump(arima, pickle_file)
// Now unpickle it and show that we get a warning (if expected)
if expect_warning:
with pytest.warns(UserWarning):
arm = joblib.load(pickle_file) // type: ARIMA
else:
arm = joblib.load(pickle_file) // type: ARIMA
// we can still produce predictions (only if we fit)
if do_fit:
arm.predict(n_periods=4)
@pytest.mark.parametrize(
"order,seasonal", [
// ARMA
pytest.param((1, 0, 0), (0, 0, 0, 0)),
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: tgsmith61591/pmdarima
Commit Name: 1ead4fe94cc00561467641317befbc26a594933a
Time: 2020-07-13
Author: tgsmith61591@gmail.com
File Name: pmdarima/arima/tests/test_arima.py
Class Name:
Method Name: test_for_older_version
Project Name: tgsmith61591/pmdarima
Commit Name: 1ead4fe94cc00561467641317befbc26a594933a
Time: 2020-07-13
Author: tgsmith61591@gmail.com
File Name: pmdarima/arima/tests/test_arima.py
Class Name:
Method Name: test_double_pickle
Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: 869e56edc7e3153b534f065e6a73d924ec28bec3
Time: 2020-05-26
Author: tmatsuo@google.com
File Name: appengine/flexible/scipy/main_test.py
Class Name:
Method Name: test_index