Skip to content

Commit

Permalink
Fix the problem with impure tests changing backend_fixtures
Browse files Browse the repository at this point in the history
One of the tests is impure, changing backend_fixtures, which breaks test_model.
This commit makes backend_fixtures to return a deep copy of backend_fixtures_json isntead of returning them directly.
  • Loading branch information
aversey committed Jul 13, 2024
1 parent 96d9448 commit 3d5cd69
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/tests/fixtures/backend_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# limitations under the License.
#

import copy
import json
import os

Expand Down Expand Up @@ -80,4 +81,4 @@

@pytest.fixture
def backend_fixtures():
return backend_fixtures_json
return copy.deepcopy(backend_fixtures_json)

0 comments on commit 3d5cd69

Please sign in to comment.