clueboy / pymssql_issues

0 stars 0 forks source link

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

Closed clueboy closed 11 years ago

clueboy commented 11 years ago

From msabramo on January 14, 2013 12:57:15

Failing test -- I discovered this while writing additional tests for issue 56 :

======================================================================
FAIL: tests.test_sprocs.TestCallProcFancy.testCallProcWithUnicodeStringWithRussianCharacters
----------------------------------------------------------------------
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/test_sprocs.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: http://code.google.com/p/pymssql/issues/detail?id=109

clueboy commented 11 years ago

From randy.syring@lev12.com on January 15, 2013 06:59:34

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.

clueboy commented 11 years ago

From msabramo on February 27, 2013 10:45:43

Summary: Failure to pass Unicode characters to callproc; failing test: tests.test_sprocs.TestCallProcFancy.testCallProcWithUnicodeStringWithRussianCharacters (was: Failure to pass Unicode characters to callproc)

clueboy commented 11 years ago

From msabramo on February 27, 2013 10:53:24

This can be reproduced with:

tox -e py27 -- -v tests.test_sprocs:TestCallProcFancy.testCallProcWithUnicodeStringWithRussianCharacters

clueboy commented 11 years ago

From msabramo on March 04, 2013 16:19:36

This appears to be due to an issue in FreeTDS that has already been fixed in the FreeTDS git repo.

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

clueboy commented 11 years ago

From msabramo on March 04, 2013 16:26:25

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.testCallProcWithUnicodeStringWithNoFunnyCharacters ... ok
tests.test_sprocs.TestCallProcFancy.testCallProcWithUnicodeStringWithRussianCharacters ... ok
tests.test_sprocs.TestCallProcFancy.testExecuteWithAsciiString ... ok
tests.test_sprocs.TestCallProcFancy.testExecuteWithNone ... ok
tests.test_sprocs.TestCallProcFancy.testExecuteWithUnicodeStringWithNoFunnyCharacters ... 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)
clueboy commented 11 years ago

From msabramo on March 04, 2013 16:37:17

Change http://code.google.com/p/pymssql/source/detail?r=d053412736735062ebe009ad4ec34f8fbaab0025 makes it skip this test since it's not a bug in pymssql; it's dependent on the version of FreeTDS installed.

Status: Fixed

clueboy commented 11 years ago

From randy.syring@lev12.com on March 05, 2013 06:23:26

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.