Skip to content

Commit

Permalink
Remove unnecessary usage of re.escape
Browse files Browse the repository at this point in the history
  • Loading branch information
eguiraud committed Oct 29, 2023
1 parent e099f29 commit 0a83967
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions tests/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause
import math
import re

import jax
import numpy as np
Expand Down Expand Up @@ -115,11 +114,9 @@ def test_unsupported_compound_binning():
with pytest.raises(
ValueError,
match=(
re.escape(
"Correction 'compound non-uniform binning' contains a compound "
"Binning correction (one or more of the bin contents are not "
"simple scalars). This is not supported."
)
"Correction 'compound non-uniform binning' contains a compound "
"Binning correction \\(one or more of the bin contents are not "
"simple scalars\\). This is not supported."
),
):
CorrectionWithGradient(schemas["compound-nonuniform-binning"])
Expand All @@ -128,7 +125,7 @@ def test_unsupported_compound_binning():
def test_unsupported_flow_type():
with pytest.raises(
ValueError,
match=re.escape(
match=(
"Correction 'simple non-uniform binning with a default value as "
"'flow'' contains a Binning correction with `flow=42.0`. "
"Only 'clamp' is supported."
Expand Down

0 comments on commit 0a83967

Please sign in to comment.