From b0878fd809ef40b5425112067104f181402670af Mon Sep 17 00:00:00 2001 From: Andrea Papaluca Date: Mon, 29 Jan 2024 10:07:15 +0400 Subject: [PATCH] test: fix test set backend --- tests/test_backends_clifford.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_backends_clifford.py b/tests/test_backends_clifford.py index b27d33a4ae..4170b33365 100644 --- a/tests/test_backends_clifford.py +++ b/tests/test_backends_clifford.py @@ -245,5 +245,8 @@ def test_set_backend(backend): clifford_bkd = construct_clifford_backend(backend) if not clifford_bkd: return - set_backend("clifford", platform=str(backend)) + platform = backend.platform + if platform is None: + platform = str(backend) + set_backend("clifford", platform=platform) assert isinstance(GlobalBackend(), type(clifford_bkd))