BUG: Allow Filter comparisons with AssetExists.

Allow comparisons like SomeFilter() & AssetExists().

Previously such comparisons would fail because & and | on Filters
explicitly checked that the other side of the operator was also a
Filter.

We now only enforce that the other side of the expression is a Term
with a dtype of bool_.
This commit is contained in:
Scott Sanderson
2016-03-19 17:04:28 -04:00
parent 705f87215b
commit 1f0e1e8908
3 changed files with 15 additions and 12 deletions
+6 -6
View File
@@ -153,7 +153,7 @@ class NumericalExpressionTestCase(TestCase):
message = e.exception.args[0]
expected = (
"Don't know how to compute datetime64[ns] + datetime64[ns].\n"
"Arithmetic operators are only supported on Factors of dtype "
"Arithmetic operators are only supported between Factors of dtype "
"'float64'."
)
self.assertEqual(message, expected)
@@ -164,7 +164,7 @@ class NumericalExpressionTestCase(TestCase):
message = e.exception.args[0]
expected = (
"Don't know how to compute datetime64[ns] * datetime64[ns].\n"
"Arithmetic operators are only supported on Factors of dtype "
"Arithmetic operators are only supported between Factors of dtype "
"'float64'."
)
self.assertEqual(message, expected)
@@ -178,8 +178,8 @@ class NumericalExpressionTestCase(TestCase):
message = e.exception.args[0]
expected = (
"Don't know how to compute float64 {sym} datetime64[ns].\n"
"Arithmetic operators are only supported on Factors of "
"dtype 'float64'."
"Arithmetic operators are only supported between Factors"
" of dtype 'float64'."
).format(sym=sym)
self.assertEqual(message, expected)
@@ -188,8 +188,8 @@ class NumericalExpressionTestCase(TestCase):
message = e.exception.args[0]
expected = (
"Don't know how to compute datetime64[ns] {sym} float64.\n"
"Arithmetic operators are only supported on Factors of "
"dtype 'float64'."
"Arithmetic operators are only supported between Factors"
" of dtype 'float64'."
).format(sym=sym)
self.assertEqual(message, expected)