djhenderson / pymssql

Automatically exported from code.google.com/p/pymssql
GNU Lesser General Public License v2.1
0 stars 0 forks source link

Failure to pass Unicode characters to callproc; failing test: tests.test_sprocs.TestCallProcFancy.testCallProcWithUnicodeStringWithRussianCharacters #109

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Failing test -- I discovered this while writing additional tests for issue 56:

FAIL: tests.test_sprocs.TestCallProcFancy.testCallProcWithUnicodeStringWithRussianChar

acters

Traceback (most recent call last): File "/home/vagrant/dev/hg-repos/pymssql/.tox/py26/lib/python2.6/site-packages/nose/case.py", line 197, in runTest self.test(*self.arg) File "/home/vagrant/dev/hg-repos/pymssql/tests/testsprocs.py", line 220, in testCallProcWithUnicodeStringWithRussianCharacters eq(a, u'\u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439!') AssertionError: u'!' != u'\u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439!'



It seems that Unicode characters are getting dropped. Any ideas?

Original issue reported on code.google.com by msabr...@gmail.com on 14 Jan 2013 at 8:57

GoogleCodeExporter commented 9 years ago
I'm sorry, I don't.  I do know that when I ran through the SQLAlchemy test 
suite with pymssql, I had some unicode related tests fail.  I can do the 
byte/unicode dance at the python level, but dropping down into cython & 
freetds, I'm pretty lost.

Original comment by randy.sy...@lev12.com on 15 Jan 2013 at 2:59

GoogleCodeExporter commented 9 years ago

Original comment by msabr...@gmail.com on 27 Feb 2013 at 6:45

GoogleCodeExporter commented 9 years ago
This can be reproduced with:

tox -e py27 -- -v 
tests.test_sprocs:TestCallProcFancy.testCallProcWithUnicodeStringWithRussianChar
acters

Original comment by msabr...@gmail.com on 27 Feb 2013 at 6:53

GoogleCodeExporter commented 9 years ago
This appears to be due to an issue in FreeTDS that has already been fixed in 
the [FreeTDS git repo](http://gitorious.org/freetds/freetds).

See http://lists.ibiblio.org/pipermail/freetds/2013q1/028272.html

Original comment by msabr...@gmail.com on 5 Mar 2013 at 12:19

GoogleCodeExporter commented 9 years ago
With a recent version of FreeTDS from git 
(a11092a21fc9ba5996854244c573248ef208e04f) installed on my OS X 10.8.2 system, 
all of the stored proc tests pass:

tox -e py27 -- -s -v tests.test_sprocs ... tests.test_sprocs.TestCallProcFancy.testCallProcWithAsciiString ... ok tests.test_sprocs.TestCallProcFancy.testCallProcWithNone ... ok tests.test_sprocs.TestCallProcFancy.testCallProcWithUnicodeStringWithNoFunnyChar acters ... ok tests.test_sprocs.TestCallProcFancy.testCallProcWithUnicodeStringWithRussianChar acters ... ok tests.test_sprocs.TestCallProcFancy.testExecuteWithAsciiString ... ok tests.test_sprocs.TestCallProcFancy.testExecuteWithNone ... ok tests.test_sprocs.TestCallProcFancy.testExecuteWithUnicodeStringWithNoFunnyChara cters ... ok tests.test_sprocs.TestCallProcFancy.testExecuteWithUnicodeWithRussianCharacters ... ok tests.test_sprocs.TestFixedTypeConversion.testBigInt ... ok tests.test_sprocs.TestFixedTypeConversion.testBit ... ok tests.test_sprocs.TestFixedTypeConversion.testDateTime ... ok tests.test_sprocs.TestFixedTypeConversion.testDecimal ... SKIP tests.test_sprocs.TestFixedTypeConversion.testInt ... ok tests.test_sprocs.TestFixedTypeConversion.testMoney ... ok tests.test_sprocs.TestFixedTypeConversion.testNumeric ... SKIP tests.test_sprocs.TestFixedTypeConversion.testSmallInt ... ok tests.test_sprocs.TestFixedTypeConversion.testTinyInt ... ok tests.test_sprocs.TestStringTypeConversion.testChar ... ok tests.test_sprocs.TestStringTypeConversion.testText ... ok tests.test_sprocs.TestStringTypeConversion.testVarChar ... ok


Ran 20 tests in 0.392s

OK (SKIP=2)

Original comment by msabr...@gmail.com on 5 Mar 2013 at 12:26

GoogleCodeExporter commented 9 years ago
Change 
http://code.google.com/p/pymssql/source/detail?r=d053412736735062ebe009ad4ec34f8
fbaab0025

makes it skip this test since it's not a bug in pymssql; it's dependent on the 
version of FreeTDS installed.

Original comment by msabr...@gmail.com on 5 Mar 2013 at 12:37

GoogleCodeExporter commented 9 years ago
I'm not sure I'd skip the test.  Rather, we should build pymssql with the 
FreeTDS that works.  That is one of the reasons I liked the idea of bundling 
our own FreeTDS, we wouldn't need to worry about version compatibility, we 
could just use what works.

Original comment by randy.sy...@lev12.com on 5 Mar 2013 at 2:23