[Python-modules-team] Bug#765117: Bug#765117: python-django: FTBFS: Tests failures

Brian May brian at microcomaustralia.com.au
Mon Oct 13 23:41:15 UTC 2014


>
> > ======================================================================
> > FAIL: test_loading_and_dumping (fixtures.tests.FixtureLoadingTests)
> > ----------------------------------------------------------------------
> > Traceback (most recent call last):
> >   File "/«PKGBUILDDIR»/tests/fixtures/tests.py", line 170, in
> test_loading_and_dumping
> >     self.assertEqual(len(w), 0)
> > AssertionError: 1 != 0
>


Ok, I can reproduce this myself.

To reproduce without running all the tests:

cd tests
LOCPATH=/tmp/tmp-locales LC_ALL=en_US.UTF-8 PYTHONPATH=.. python3
./runtests.py --verbosity=2 fixtures.tests.FixtureLoadingTests

The code in question is:

        # An attempt to load a nonexistent 'initial_data' fixture isn't an
error
        with warnings.catch_warnings(record=True) as w:

            management.call_command('loaddata', 'initial_data.json',
verbosity=0)
        self.assertEqual(len(w), 0)


So to me it looks like loaddata is generating 1 warning, when we were
hoping for no warnings.

It would appear to be a Python3 specific problem.

The value of w[0] at the time of the failure is:

"{message : RemovedInDjango19Warning('initial_data fixtures are deprecated.
Use data migrations instead.',), category : 'RemovedInDjango19Warning',
filename :
'/home/brian/tree/debian/unstable/python-django/python-django/django/core/management/commands/loaddata.py',
lineno : 230, line : None}"

Now I am a bit puzzled as to (a) why this didn't occur previously or on
wheezy, and (b) why it only happens with Python3.
-- 
Brian May <brian at microcomaustralia.com.au>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/python-modules-team/attachments/20141014/0e5ab53e/attachment.html>


More information about the Python-modules-team mailing list