@@ -401,7 +401,10 @@ def test_frame_invert(self, engine, parser):
401401 with pytest .raises (ValueError , match = "unknown type object" ):
402402 pd .eval (expr , engine = engine , parser = parser )
403403 else :
404- msg = "bad operand type for unary ~: 'str'"
404+ if tm .IS_PYPY :
405+ msg = "unsupported operand type for unary"
406+ else :
407+ msg = "bad operand type for unary ~: 'str'"
405408 with pytest .raises (TypeError , match = msg ):
406409 pd .eval (expr , engine = engine , parser = parser )
407410
@@ -448,7 +451,10 @@ def test_series_invert(self, engine, parser):
448451 with pytest .raises (ValueError , match = "unknown type object" ):
449452 pd .eval (expr , engine = engine , parser = parser )
450453 else :
451- msg = "bad operand type for unary ~: 'str'"
454+ if tm .IS_PYPY :
455+ msg = "unsupported operand type for unary"
456+ else :
457+ msg = "bad operand type for unary ~: 'str'"
452458 with pytest .raises (TypeError , match = msg ):
453459 pd .eval (expr , engine = engine , parser = parser )
454460
@@ -541,7 +547,10 @@ def test_series_pos(self, lhs, engine, parser):
541547 tm .assert_series_equal (expect , result )
542548
543549 def test_scalar_unary (self , engine , parser ):
544- msg = "bad operand type for unary ~: 'float'"
550+ if tm .IS_PYPY :
551+ msg = "unsupported operand type for unary"
552+ else :
553+ msg = "bad operand type for unary ~: 'float'"
545554 with pytest .raises (TypeError , match = msg ):
546555 pd .eval ("~1.0" , engine = engine , parser = parser )
547556
0 commit comments