mirror of
https://github.com/wassname/catalyst.git
synced 2026-08-14 12:10:24 +08:00
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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user