Skip to content

Commit 8836238

Browse files
committed
test: update error messages in test_with_columns_invalid_expr to use EXPR_TYPE_ERROR
1 parent 763e083 commit 8836238

1 file changed

Lines changed: 4 additions & 12 deletions

File tree

python/tests/test_dataframe.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -428,21 +428,13 @@ def test_with_columns(df):
428428

429429

430430
def test_with_columns_invalid_expr(df):
431-
with pytest.raises(
432-
TypeError, match=r"Use col\(\)/column\(\) or lit\(\)/literal\(\)"
433-
):
431+
with pytest.raises(TypeError, match=re.escape(EXPR_TYPE_ERROR)):
434432
df.with_columns("a")
435-
with pytest.raises(
436-
TypeError, match=r"Use col\(\)/column\(\) or lit\(\)/literal\(\)"
437-
):
433+
with pytest.raises(TypeError, match=re.escape(EXPR_TYPE_ERROR)):
438434
df.with_columns(c="a")
439-
with pytest.raises(
440-
TypeError, match=r"Use col\(\)/column\(\) or lit\(\)/literal\(\)"
441-
):
435+
with pytest.raises(TypeError, match=re.escape(EXPR_TYPE_ERROR)):
442436
df.with_columns(["a"])
443-
with pytest.raises(
444-
TypeError, match=r"Use col\(\)/column\(\) or lit\(\)/literal\(\)"
445-
):
437+
with pytest.raises(TypeError, match=re.escape(EXPR_TYPE_ERROR)):
446438
df.with_columns(c=["a"])
447439

448440

0 commit comments

Comments
 (0)