Re: Some Django unit tests fail...
> On Fri, Jun 20, 2008 at 1:07 AM, Peter Melvyn <[EMAIL PROTECTED]> wrote: > > Yes, it is the intention. If Django requires test database with > > charset UTF8, IMHO it should create it using related clause. as well > > as proper engine should be choosen if we care about reference > > integrity, e.g. > > > > SET storage_engine=InnoDB; > > CREATE DATABASE xxx > > DEFAULT CHARACTER SET utf8 > > COLLATE utf8_xxx_ci; I found that Django is awared for this already: in django.test.utils is the function get_mysql_create_suffix() which reads values TEST_DATABASE_CHARSET and COLLATION from settings... > I won't ever say no to a ticket. Make a proposal, and we will see if > it floats :-) I've added a note highlighting this in paragraph describing django tests in contribution chapter and created ticket #7534 Peter --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Some Django unit tests fail...
On Sat, Jun 21, 2008 at 12:29 AM, Ramiro Morales <[EMAIL PROTECTED]> wrote: > > On Thu, Jun 19, 2008 at 11:20 AM, Russell Keith-Magee > <[EMAIL PROTECTED]> wrote: >> >> On Thu, Jun 19, 2008 at 10:08 PM, Ramiro Morales <[EMAIL PROTECTED]> wrote: >>> > >>> >>> Maybe a note about this dependency of that particular Django test >>> suite component could >>> be added to the "Unit tests" section of the "Contributing to Django" >>> document?. >> >> I'm happy to add the note. Open a ticket with some draft text, bump it >> to ready-for-checkin and I'll commit it when I get a chance. >> > > Done on #7513 Fixed in [7718]. Thanks for the original draft - you'll note that my text is slightly different to yours. It occurred to me that there are actually a couple of other dependencies to the test system, but they are silent failures - the tests are skipped if the dependent libraries are not found. If anyone with a 'clean' system wants to work on a patch to do the same for the egg loader test (including an update to the contributing.txt documentation I just added), I'll commit it. Yours, Russ Magee %-) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Some Django unit tests fail...
On Thu, Jun 19, 2008 at 11:20 AM, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > > On Thu, Jun 19, 2008 at 10:08 PM, Ramiro Morales <[EMAIL PROTECTED]> wrote: >> >> >> Maybe a note about this dependency of that particular Django test >> suite component could >> be added to the "Unit tests" section of the "Contributing to Django" >> document?. > > I'm happy to add the note. Open a ticket with some draft text, bump it > to ready-for-checkin and I'll commit it when I get a chance. > Done on #7513 Regards, -- Ramiro Morales --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Some Django unit tests fail...
On Fri, Jun 20, 2008 at 1:07 AM, Peter Melvyn <[EMAIL PROTECTED]> wrote: > > On 6/19/08, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > > Yes, it is the intention. If Django requires test database with > charset UTF8, IMHO it should create it using related clause. as well > as proper engine should be choosen if we care about reference > integrity, e.g. > > SET storage_engine=InnoDB; > CREATE DATABASE xxx > DEFAULT CHARACTER SET utf8 > COLLATE utf8_xxx_ci; > > > Should I create a ticket ;-) I won't ever say no to a ticket. Make a proposal, and we will see if it floats :-) Yours Russ Magee %-) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Some Django unit tests fail...
On 6/19/08, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > The only obvious thing I can glean from your stack traces is a > possible language problem - the last stack trace is complaining of a > collation mix, which suggests that your MySQL install isn't using utf8 > all the time. Yes, it is the intention. If Django requires test database with charset UTF8, IMHO it should create it using related clause. as well as proper engine should be choosen if we care about reference integrity, e.g. SET storage_engine=InnoDB; CREATE DATABASE xxx DEFAULT CHARACTER SET utf8 COLLATE utf8_xxx_ci; Should I create a ticket ;-) Peter --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Some Django unit tests fail...
On Thu, Jun 19, 2008 at 10:08 PM, Ramiro Morales <[EMAIL PROTECTED]> wrote: > > I've found this same problem last week both on a Linux system and on a > Windows one. > The common factor was they were systems where the 'stack' has had just > been installed > Python 2.4 and Python 2.5 respectively). Installing the right > setuptools version solved the > problems. > > Maybe a note about this dependency of that particular Django test > suite component could > be added to the "Unit tests" section of the "Contributing to Django" > document?. I'm happy to add the note. Open a ticket with some draft text, bump it to ready-for-checkin and I'll commit it when I get a chance. Yours, Russ Magee %-) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Some Django unit tests fail...
On Thu, Jun 19, 2008 at 10:27 AM, Peter Melvyn <[EMAIL PROTECTED]> wrote: > > Hi all, > > I wanted to make sure that all unit tests will pass after #3030 fix > and run Django unit tests on trunk updated to r7703 on Windows, Python > 2.4 and MySQL 5.0.37. > > But I found that some test failes: > > 1. If I've run all tests, I get error: > > Traceback (most recent call last): > File "C:\Python24\Lib\site-packages\django-trunk\tests\runtests.py", > line 183, in ? >django_tests(int(options.verbosity), options.interactive, args) > File "C:\Python24\Lib\site-packages\django-trunk\tests\runtests.py", > line 153, in django_tests >failures = run_tests(test_labels, verbosity=verbosity, > interactive=interactive, extra_tests=extra_tests) > File "C:\Python24\Lib\site-packages\django-trunk\django\test\simple.py", > line 136, in run_tests >suite.addTest(build_suite(app)) > File "C:\Python24\Lib\site-packages\django-trunk\django\test\simple.py", > line 59, in build_suite >test_module = get_tests(app_module) > File "C:\Python24\Lib\site-packages\django-trunk\django\test\simple.py", > line 17, in get_tests >test_module = __import__('.'.join(app_path + [TEST_MODULE]), {}, > {}, TEST_MODULE) > File > "C:\Python24\Lib\site-packages\django-trunk\tests\regressiontests\templates\tests.py", > line 23, in ? >from loaders import * > File > "C:\Python24\Lib\site-packages\django-trunk\tests\regressiontests\templates\loaders.py", > line 13, in ? >import pkg_resources > ImportError: No module named pkg_resources > AFAICT the failing test is the one trying to execise the Python egg template loader. I've found this same problem last week both on a Linux system and on a Windows one. The common factor was they were systems where the 'stack' has had just been installed Python 2.4 and Python 2.5 respectively). Installing the right setuptools version solved the problems. Maybe a note about this dependency of that particular Django test suite component could be added to the "Unit tests" section of the "Contributing to Django" document?. Regards, -- Ramiro Morales --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Some Django unit tests fail...
On Thu, Jun 19, 2008 at 9:27 PM, Peter Melvyn <[EMAIL PROTECTED]> wrote: > > Hi all, > > I wanted to make sure that all unit tests will pass after #3030 fix > and run Django unit tests on trunk updated to r7703 on Windows, Python > 2.4 and MySQL 5.0.37. I'm not seeing any failures at the moment; the buildbot: http://buildbot.djangoproject.com/ concurs (for trunk, anyway). > Is there anything I've missed that Django unit tests do not pass on my > installation? The only obvious thing I can glean from your stack traces is a possible language problem - the last stack trace is complaining of a collation mix, which suggests that your MySQL install isn't using utf8 all the time. Yours Russ Magee %-) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Some Django unit tests fail...
Hi all, I wanted to make sure that all unit tests will pass after #3030 fix and run Django unit tests on trunk updated to r7703 on Windows, Python 2.4 and MySQL 5.0.37. But I found that some test failes: 1. If I've run all tests, I get error: Traceback (most recent call last): File "C:\Python24\Lib\site-packages\django-trunk\tests\runtests.py", line 183, in ? django_tests(int(options.verbosity), options.interactive, args) File "C:\Python24\Lib\site-packages\django-trunk\tests\runtests.py", line 153, in django_tests failures = run_tests(test_labels, verbosity=verbosity, interactive=interactive, extra_tests=extra_tests) File "C:\Python24\Lib\site-packages\django-trunk\django\test\simple.py", line 136, in run_tests suite.addTest(build_suite(app)) File "C:\Python24\Lib\site-packages\django-trunk\django\test\simple.py", line 59, in build_suite test_module = get_tests(app_module) File "C:\Python24\Lib\site-packages\django-trunk\django\test\simple.py", line 17, in get_tests test_module = __import__('.'.join(app_path + [TEST_MODULE]), {}, {}, TEST_MODULE) File "C:\Python24\Lib\site-packages\django-trunk\tests\regressiontests\templates\tests.py", line 23, in ? from loaders import * File "C:\Python24\Lib\site-packages\django-trunk\tests\regressiontests\templates\loaders.py", line 13, in ? import pkg_resources ImportError: No module named pkg_resources 2. If I've run single tests, I get error in some particular tests as well, e.g. FAIL: Doctest: modeltests.basic.models.__test__.API_TESTS -- ... Failed example: Article.objects.get(pk=a.id).headline Expected: u'\u6797\u539f \u3081\u3050\u307f' Got: u'Article 12' ### FAIL: Doctest: modeltests.custom_pk.models.__test__.API_TESTS -- File "C:\Python24\Lib\site-packages\django-trunk\tests\modeltests\custom_pk\models.py", line ?, in modeltests.custom_pk.models.__test__.API_TESTS Failed example: emp.save() Exception raised: Traceback (most recent call last): File "C:\Python24\Lib\site-packages\django-trunk\django\test\_doctest.py", line 1267, in __run compileflags, 1) in test.globs File "", line 1, in ? emp.save() File "C:\Python24\Lib\site-packages\django-trunk\django\db\models\base.py", line 272, in save self.save_base() File "C:\Python24\Lib\site-packages\django-trunk\django\db\models\base.py", line 313, in save_base if manager.filter(pk=pk_val).extra(select={'a': 1}).values('a').order_by(): File "C:\Python24\Lib\site-packages\django-trunk\django\db\models\query.py", line 84, in __nonzero__ iter(self).next() File "C:\Python24\Lib\site-packages\django-trunk\django\db\models\query.py", line 78, in _result_iter self._fill_cache() File "C:\Python24\Lib\site-packages\django-trunk\django\db\models\query.py", line 494, in _fill_cache self._result_cache.append(self._iter.next()) File "C:\Python24\Lib\site-packages\django-trunk\django\db\models\query.py", line 520, in iterator for row in self.query.results_iter(): File "C:\Python24\Lib\site-packages\django-trunk\django\db\models\sql\query.py", line 200, in results_iter for rows in self.execute_sql(MULTI): File "C:\Python24\Lib\site-packages\django-trunk\django\db\models\sql\query.py", line 1474, in execute_sql cursor.execute(sql, params) File "C:\Python24\Lib\site-packages\MySQLdb\cursors.py", line 166, in execute self.errorhandler(self, exc, value) File "C:\Python24\Lib\site-packages\MySQLdb\connections.py", line 35, in defaulterrorhandler raise errorclass, errorvalue OperationalError: (1267, "Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='") etc... ### Is there anything I've missed that Django unit tests do not pass on my installation? Thx, Peter --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---