On Mon, Apr 20, 2009 at 11:11 AM, jeffhg58 <jeffh...@comcast.net> wrote:
> > Hi, > > after I've updated to svn release 10604, django's test suite fails > with this message, using sqlite3 and python 2.6 on windows xp: > > Failures are also located in http://dpaste.com/34864/ > > Failure 1 is the same as http://code.djangoproject.com/ticket/6802 > which is now closed. > Maybe same failure, but different cause. You appear to be running the tests with a settings file that sets MEDIA_URL to 'C:/djangoproj/media/'? (BTW that looks more like a MEDIA_ROOT setting than MEDIA_URL -- you've got a file path, where it should be a url.) You don't need to set MEDIA_ROOT to anything when using runtests.py. Doc says ( http://docs.djangoproject.com/en/dev/internals/contributing/#running-the-unit-tests) you only need DATABASE_ENGINE, plus whatever other DATABASE_XXXXX settings needed for the database you are using. So you can likely fix this one by just removing the MEDIA_ROOT setting from the settings file you use for testing. (Alternatively perhaps that test should be changed to not rely on MEDIA_ROOT having its default value of ''. I don't know whether it's known/expected/accepted that the tests are assuming defaults for some settings. I generally just run with very minimal settings files when using runtests.py.) > > Failure 3 is documented in http://code.djangoproject.com/ticket/10843 > > Any help with Failures 1 and 2 would be greatly appreciated. The 2nd failure (unable to delete a temp file on Windows because it's in use) I cannot recreate, even using the same OS and Python (well, close, I've got Python 2.6.1). So that's a bit of a mystery. The side-effect of the failure will be that the tests don't completely clean up after themselves, and you get temp files accumulating in your temp directory. Perhaps you could look into that test and see if you can figure out what is being done with the 'mug' file such that it isn't closed before deleting (apparently only in some cases). That's all I can think to do to track it down, and I don't at the moment have time for digging into it myself. Karen > > Thanks, > Jeff > > ====================================================================== > FAIL: Doctest: > regressiontests.admin_widgets.models.__test__.WIDGETS_TESTS > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "C:\Python26\lib\site-packages\django\test\_doctest.py", line > 2180, in runTest > raise self.failureException(self.format_failure(new.getvalue())) > AssertionError: Failed doctest test for > regressiontests.admin_widgets.models.__test__.WIDGETS_TESTS > File "C:\djangosource\django-latest\trunk\tests\regressiontests > \admin_widgets\models.py", line unknown line number, in WIDGETS_TESTS > > ---------------------------------------------------------------------- > File "C:\djangosource\django-latest\trunk\tests\regressiontests > \admin_widgets\models.py", line ?, in > regressiontests.admin_widgets.models.__test__.WIDGETS_TESTS > Failed example: > print conditional_escape(w.render('test', album.cover_art)) > Expected: > Currently: <a target="_blank" href="C:/djangoproj/media/albums/ > hybrid_theory.jpg">albums\hybrid_theory.jpg</a> <br />Change: <input > type="file" name="test" /> > Got: > Currently: <a target="_blank" href="albums/ > hybrid_theory.jpg">albums\hybrid_theory.jpg</a> <br />Change: <input > type="file" name="test" /> > > > ====================================================================== > FAIL: Doctest: regressiontests.file_storage.models.__test__.API_TESTS > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "C:\Python26\lib\site-packages\django\test\_doctest.py", line > 2180, in runTest > raise self.failureException(self.format_failure(new.getvalue())) > AssertionError: Failed doctest test for > regressiontests.file_storage.models.__test__.API_TESTS > File "C:\djangosource\django-latest\trunk\tests\regressiontests > \file_storage\models.py", line unknown line number, in API_TESTS > > ---------------------------------------------------------------------- > File "C:\djangosource\django-latest\trunk\tests\regressiontests > \file_storage\models.py", line ?, in > regressiontests.file_storage.models.__test__.API_TESTS > Failed example: > shutil.rmtree(temp_storage_dir) > Exception raised: > Traceback (most recent call last): > File "C:\Python26\lib\site-packages\django\test\_doctest.py", > line 1267, in __run > compileflags, 1) in test.globs > File "<doctest > regressiontests.file_storage.models.__test__.API_TESTS[26]>", line 1, > in <module> > shutil.rmtree(temp_storage_dir) > File "C:\Python26\lib\shutil.py", line 216, in rmtree > rmtree(fullname, ignore_errors, onerror) > File "C:\Python26\lib\shutil.py", line 221, in rmtree > onerror(os.remove, fullname, sys.exc_info()) > File "C:\Python26\lib\shutil.py", line 219, in rmtree > os.remove(fullname) > WindowsError: [Error 32] The process cannot access the file > because it is being used by another process: 'c:\\temp\\tmpuktpwh\ > \tests\\mug' > > > ====================================================================== > FAIL: test_textile (django.contrib.markup.tests.Templates) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "C:\Python26\lib\site-packages\django\contrib\markup\tests.py", > line 27, in test_textile > <p>Paragraph 2 with “quotes” and <code>code</code></ > p>""") > AssertionError: u'<p>Paragraph 1</p>\n\n\t<p>Paragraph 2 with > “quotes” and <code>code</code></p>' != '<p>Paragraph 1</p> > \n\n<p>Paragraph 2 with “quotes” and <code>code</code></ > p>' > > ---------------------------------------------------------------------- > Ran 789 tests in 189.704s > > FAILED (failures=3) > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---