diff --git a/testing/qdp_python/test_fallback.py b/testing/qdp_python/test_fallback.py index 270f3f2638..381fb6d95b 100644 --- a/testing/qdp_python/test_fallback.py +++ b/testing/qdp_python/test_fallback.py @@ -273,7 +273,10 @@ def test_streaming_raises(self): def test_invalid_backend_raises(self): from qumat_qdp.loader import QuantumDataLoader - with pytest.raises(ValueError, match="'rust', 'pytorch', or 'auto'"): + with pytest.raises( + ValueError, + match=r"backend must be one of \['auto', 'pytorch', 'rust'\], got 'invalid'", + ): QuantumDataLoader(device_id=0).backend("invalid")