Re: mysqlIndexerTest.test_unicode fails for me

"John P. Rouillard" <[email protected]>
Newsgroups gmane.comp.bug-tracking.roundup.devel
Message-ID <[email protected]>
In message <[email protected]>,
Christof Meerwald writes:
>On Wed, Apr 29, 2020 at 07:56:39PM -0400, John P. Rouillard wrote:
>> Then only special thing I see is:
>> 
>>        # HACK: workaround mysql bug: http://bugs.mysql.com/bug.php?id=74901
>>        #   needed for test_mysql.mysqlDBTest.testFilteringSpecialChars
>>        sed -i -e 's/CREATE DATABASE \%s/CREATE DATABASE \%s COLLATE utf8_general_ci/' roundup/backends/back_mysql.py
>> 
>> Could that have something to do with it?
>
>Yes, I copied that straight from the travis config
>
>> Also Christof, is the test coverage info pushed off to some app or is
>> it just visible as part of the circleci log?
>
>At the moment it's only available in circleci.
>
>BTW, I have now added a test run based on Ubuntu 20.04
>
>The reverse multilink tests seem to be failing on all platforms:
>
>https://circleci.com/bb/cmeerw/roundup-tracker/76
>https://circleci.com/bb/cmeerw/roundup-tracker/79
>https://circleci.com/bb/cmeerw/roundup-tracker/81

Also the mysql encoding change is failing in travis:

https://travis-ci.org/github/roundup-tracker/roundup/jobs/681522097#L6967


  =================================== FAILURES ===================================

  ________________________ mysqlDBTest.testStringUnicode _________________________

  self = <test.test_mysql.mysqlDBTest testMethod=testStringUnicode>

      def testStringUnicode(self):

	  # test set & retrieve

	  ustr = u2s(u'\xe4\xf6\xfc\u20ac')

	  nid = self.db.issue.create(title=ustr, status='1')

  >       self.assertEqual(self.db.issue.get(nid, 'title'), ustr)

  test/db_test_base.py:302: 

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
  ...
            if value is not None:

>               value = self.to_hyperdb_value(props[name].__class__)(value)

E               UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-3: ordinal not in range(128)

   roundup/backends/rdbms_common.py:1205: UnicodeEncodeError

which makes sense since it was working with deault (latin1??)
encoding, so making it utf8 changes that.

--
				-- rouilj
John Rouillard
===========================================================================
My employers don't acknowledge my existence much less my opinions.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.