Skip to content

Commit 643c0e5

Browse files
authored
Bugfix: regex should be a raw string
1 parent df73348 commit 643c0e5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pyomo/core/tests/unit/test_set.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -6459,7 +6459,7 @@ def test_issue_3284(self):
64596459
problem.subset_A.add(4)
64606460
# set subset_B
64616461
problem.subset_B.add((3, 4))
6462-
with self.assertRaisesRegex(ValueError, ".*Cannot add value \(7, 8\)"):
6462+
with self.assertRaisesRegex(ValueError, r".*Cannot add value \(7, 8\)"):
64636463
problem.subset_B.add((7, 8))
64646464
# set subset_C
64656465
problem.subset_C[2].add(7)
@@ -6475,7 +6475,7 @@ def test_issue_3284(self):
64756475
problem.E[1].add(4)
64766476
# set F
64776477
problem.F[(1, 2, 3)].add((3, 4))
6478-
with self.assertRaisesRegex(ValueError, ".*Cannot add value \(4, 3\)"):
6478+
with self.assertRaisesRegex(ValueError, r".*Cannot add value \(4, 3\)"):
64796479
problem.F[(4, 5, 6)].add((4, 3))
64806480
# check them
64816481
self.assertEqual(list(problem.A), [1, 2, 3])

0 commit comments

Comments
 (0)