Yes, the test should be skipped, IMHO.  In the adodbapi test suite, it was necessary to do this in many cases, so a function to determine the underlying dialect of SQL at the moment was added to the test suite. (I often wish there were a way to add it to the connection object.) For example:<br>
&lt;Python&gt;<br>    def testDataTypeBinary(self):<br>        if self.getEngine() == &#39;MySQL&#39;:<br>            pass #self.helpTestDataType(&quot;BLOB&quot;,&#39;BINARY&#39;,adodbapi.Binary(&#39;\x00\x01\xE2\x40&#39;))<br>
        else:<br>            binfld = str2bytes(&#39;\x00\x01\xE2\x40&#39;)  # works in Python 2 or 3<br>            self.helpTestDataType(&quot;binary(4)&quot;,&#39;BINARY&#39;,adodbapi.Binary(binfld))<br>            self.helpTestDataType(&quot;varbinary(100)&quot;,&#39;BINARY&#39;,adodbapi.Binary(binfld))<br>
            self.helpTestDataType(&quot;image&quot;,&#39;BINARY&#39;,adodbapi.Binary(binfld))<br>&lt;\Python&gt;<br><br>Question for the group: <br><br>  I think it would be handy if such a function (or perhaps an attribute) were added to the database object. It could contain the &quot;scheme&quot; as a string, perhaps, or perhaps something more definitive.  Such a feature would be very helpful in an ADO implementation. <br>
<br>Would the group entertain such a thing? <br><br>Could it/how should it be done?<br>--<br>Vernon Cole<br><br><br><div class="gmail_quote">On Tue, Jun 23, 2009 at 8:30 AM, Drew Smathers <span dir="ltr">&lt;<a href="mailto:drew.smathers@gmail.com">drew.smathers@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">On Tue, Jun 23, 2009 at 5:16 AM, James Henstridge&lt;<a href="mailto:james@jamesh.id.au">james@jamesh.id.au</a>&gt; wrote:<br>

&gt; On Mon, Jun 22, 2009 at 11:44 PM, Jason Baker&lt;<a href="mailto:jbaker@zeomega.com">jbaker@zeomega.com</a>&gt; wrote:<br>
&gt;&gt; There are two tests left that are giving me trouble:<br>
&gt;&gt;<br>
&gt;&gt;    def test_is_in_empty_result_set(self):<br>
&gt;&gt;        result1 = self.store.find(Foo, Foo.id &lt; 10)<br>
&gt;&gt;        result2 = self.store.find(Foo, Or(Foo.id &gt; 20, Foo.id.is_in(result1)))<br>
&gt;&gt;        self.assertEquals(result2.count(), 1)<br>
&gt;&gt;<br>
&gt;&gt;    def test_is_in_empty_list(self):<br>
&gt;&gt;        result2 = self.store.find(Foo, Eq(False, And(True, Foo.id.is_in([]))))<br>
&gt;&gt;        self.assertEquals(result2.count(), 3)<br>
&gt;&gt;<br>
&gt;&gt; Both of these tests pass a Python Boolean to the backend.  The problem<br>
&gt;&gt; is that these both pass a boolean value in the WHERE clause, which<br>
&gt;&gt; there&#39;s really not any direct translation for in Oracle.  I tried it<br>
&gt;&gt; with this compile function:<br>
&gt;&gt;<br>
&gt;&gt; @compile.when(bool)<br>
&gt;&gt; def compile_bool(compile, expr, state):<br>
&gt;&gt;    return compile_eq(compile, Eq(1, int(expr)), state)<br>
&gt;&gt;<br>
&gt;&gt; This essentially converts a bool to a 1=1 or 1=0 expression.  This<br>
&gt;&gt; works with the first test, but the second one gives me this:<br>
&gt;&gt;<br>
&gt;&gt; [10:27:38.064000] EXECUTE: &#39;SELECT COUNT(*) FROM foo WHERE 1 = 0 = (1<br>
&gt;&gt; = 1 AND 1 = 0)&#39;, (1, 0, 1, 1, 1, 0)<br>
&gt;&gt; [10:27:38.111000] ERROR: ORA-00933: SQL command not properly ended<br>
&gt;&gt;<br>
&gt;&gt; Which is of course gibberish in Oracle.  I can run the test without a<br>
&gt;&gt; WHERE clause and have it work, but will anything break if the backend<br>
&gt;&gt; can&#39;t handle an expression of the form FALSE = (TRUE AND FALSE)?  Or<br>
&gt;&gt; is there a better way to do this that I&#39;m missing?<br>
&gt;<br>
&gt; If this is just a case of parentheses, it might be easiest to do the following:<br>
&gt;<br>
&gt; @compile.when(bool)<br>
&gt; def compile_bool(compile, expr, state):<br>
&gt;    if expr:<br>
&gt;        return &quot;(1=1)&quot;<br>
&gt;    else:<br>
&gt;        return &quot;(1=0)&quot;<br>
&gt;<br>
&gt; That should avoid the operator precedence problems.<br>
&gt;<br>
&gt; James.<br>
&gt;<br>
<br>
</div></div>The problem is more than operator precendence with Oracle; Oracle<br>
simply doesn&#39;t have a boolean type (outside of PL/SQL) and can&#39;t<br>
understand a boolean comparison: (1=0) = (1=1).  This would result in<br>
an ORA-00933.  In that respect, I don&#39;t see how it&#39;s possible to make<br>
test_is_in_empty_list pass since it involves a boolean comparison.<br>
Given that boolean data type is optional in the SQL spec, would it not<br>
be sufficient to skip this test for oracle?<br>
<font color="#888888"><br>
-Drew<br>
</font><div><div></div><div class="h5"><br>
--<br>
storm mailing list<br>
<a href="mailto:storm@lists.canonical.com">storm@lists.canonical.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/storm" target="_blank">https://lists.ubuntu.com/mailman/listinfo/storm</a><br>
</div></div></blockquote></div><br>