From 355fbabde205788b9a43bf3b0ef055e72495ee59 Mon Sep 17 00:00:00 2001 From: "Kevin J. Sung" Date: Mon, 27 Jan 2025 15:03:02 +0800 Subject: [PATCH] fix test --- tests/python/operators/fermion_operator_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/python/operators/fermion_operator_test.py b/tests/python/operators/fermion_operator_test.py index 83808ef61..015fc7a82 100644 --- a/tests/python/operators/fermion_operator_test.py +++ b/tests/python/operators/fermion_operator_test.py @@ -596,8 +596,8 @@ def test_str_equivalent(): (ffsim.cre_b(2), ffsim.des_b(1)): 1 - 0.5j, } ) - exec("from ffsim import cre_a, cre_b, des_a, des_b") - assert eval(str(op)) == op + exec("from ffsim import cre_a, cre_b, des_a, des_b", globals()) + assert eval(str(op), globals()) == op def test_copy():