Skip to content

Commit 7d2cce3

Browse files
author
MarcoGorelli
committed
put test back, its not a helper
1 parent e13b5a8 commit 7d2cce3

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pandas/tests/computation/test_eval.py

+10
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,16 @@ def test_pow(self, lhs, rhs, engine, parser):
353353
expected = _eval_single_bin(middle, "**", rhs, engine)
354354
tm.assert_almost_equal(result, expected)
355355

356+
def test_check_single_invert_op(self, lhs, engine, parser):
357+
# simple
358+
try:
359+
elb = lhs.astype(bool)
360+
except AttributeError:
361+
elb = np.array([bool(lhs)])
362+
expected = ~elb
363+
result = pd.eval("~elb", engine=engine, parser=parser)
364+
tm.assert_almost_equal(expected, result)
365+
356366
def test_frame_invert(self, engine, parser):
357367
expr = "~lhs"
358368

0 commit comments

Comments
 (0)