From 41ff2b95e7af5ffe08703cb6eb9cf824ae9bee26 Mon Sep 17 00:00:00 2001 From: sturmianseq Date: Tue, 31 Aug 2021 12:42:24 -0700 Subject: [PATCH] Removing state pollution in `init_ExpStock.__next__()` --- expstock/test_expstock.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/expstock/test_expstock.py b/expstock/test_expstock.py index aa4bda5..20483f8 100644 --- a/expstock/test_expstock.py +++ b/expstock/test_expstock.py @@ -1,6 +1,7 @@ from __future__ import absolute_import from __future__ import division from __future__ import print_function +import copy from datetime import datetime import mock import os @@ -65,7 +66,7 @@ def test__get_git_info(init_ExpStock): assert git_diff == expect_git_diff def test_append_param(init_ExpStock): - e = init_ExpStock.__next__() + e = copy.deepcopy(init_ExpStock.__next__()) test_param1 = 12345 test_param2 = 'test_param' e.append_param(test_param1=test_param1, test_param2=test_param2)