Skip to content

Commit d2bc74d

Browse files
committed
[FIX] base: stdlib error message changed on test case
python/cpython#131568 Adapt the regex to handle both < 3.13 and >= 3.13 for this specific test case.
1 parent 69921fe commit d2bc74d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

odoo/addons/base/tests/test_expression.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -867,7 +867,10 @@ def test_invalid(self):
867867
with self.assertRaisesRegex(ValueError, r"^Invalid leaf \('create_date', '>>', 'foo'\)$"):
868868
Country.search([('create_date', '>>', 'foo')])
869869

870-
with self.assertRaisesRegex(ValueError, r"^stray % in format '%'$"):
870+
with self.assertRaisesRegex(
871+
ValueError,
872+
r"^(time data 'foo' does not match|stray % in) format '%'$",
873+
):
871874
Country.search([]).filtered_domain([('create_date', '>>', 'foo')])
872875

873876
with self.assertRaisesRegex(psycopg2.DataError, r"invalid input syntax"):

0 commit comments

Comments
 (0)