Errors in tests when working through contribution tutorial

44 views
Skip to first unread message

Lee Cartwright

unread,
Oct 12, 2015, 8:12:20 PM10/12/15
to Django users
Hi,

I'm not sure if this is the right group for this question, but I figured it was the best place to start. I'm interested in contributing to the Django project and have spent some time today working through the contribution tutorial. I've got to the initial 'running tests' stage and have a few test errors that I cannot figure out. The output is:

======================================================================

FAIL: test_old_style_storage (file_storage.tests.FileFieldStorageTests)

----------------------------------------------------------------------

Traceback (most recent call last):

  File "/Users/leec/Development/django/contrib_tutorial/django/tests/file_storage/tests.py", line 566, in test_old_style_storage

    self.assertEqual(len(warns), 2)

AssertionError: 4 != 2


======================================================================

FAIL: test_migrate_legacy_router (multiple_database.tests.RouterTestCase)

----------------------------------------------------------------------

Traceback (most recent call last):

  File "/Users/leec/Development/django/contrib_tutorial/django/tests/multiple_database/tests.py", line 954, in test_migrate_legacy_router

    self.assertEqual(recorded, [])

AssertionError: Lists differ: [<warnings.WarningMessage object at 0x10e915828>] != []


First list contains 1 additional elements.

First extra element 0:

{message : DeprecationWarning('inspect.getargspec() is deprecated, use inspect.signature() instead',), category : 'DeprecationWarning', filename : '/Users/leec/Development/django/contrib_tutorial/django/django/db/utils.py', lineno : 293, line : None}


- [<warnings.WarningMessage object at 0x10e915828>]

+ []


======================================================================

FAIL: test_if_tag_eq_deprecated (template_tests.syntax_tests.test_if.IfTagTests)

----------------------------------------------------------------------

Traceback (most recent call last):

  File "/Users/leec/Development/django/contrib_tutorial/django/django/test/utils.py", line 182, in inner

    return test_func(*args, **kwargs)

  File "/Users/leec/Development/django/contrib_tutorial/django/tests/template_tests/utils.py", line 62, in inner

    func(self)

  File "/Users/leec/Development/django/contrib_tutorial/django/tests/template_tests/syntax_tests/test_if.py", line 537, in test_if_tag_eq_deprecated

    self.assertEqual(len(warns), 1)

AssertionError: 3 != 1


======================================================================

FAIL: test_only_new_files (utils_tests.test_autoreload.TestFilenameGenerator)

----------------------------------------------------------------------

Traceback (most recent call last):

  File "/Users/leec/Development/django/contrib_tutorial/django/tests/utils_tests/test_autoreload.py", line 87, in test_only_new_files

    self.assertEqual(len(filenames2), 1)

AssertionError: 0 != 1


----------------------------------------------------------------------


I'm guessing this is because something isn't quite right in my development set up but I haven't been able to figure out exactly what. If anyone can give me some pointers as to what I should check I'd really appreciate it.


OS: Mac OS X Yosemite (10.10.5)

Python: 3.5.0


Thanks,

Lee

Tim Graham

unread,
Oct 12, 2015, 9:54:51 PM10/12/15
to Django users
Hi Lee, I think the issue is that the tests don't pass on Python 3.5 at the commit where the contributing was tutorial was authored. I suppose we'll have to update it to use a more recent patch or at least mention this caveat for now.

Lee Cartwright

unread,
Oct 12, 2015, 10:32:17 PM10/12/15
to Django users
Hi Tim,

I hadn't considered that. I'll try with a different version of Python 3.

Thanks,
Lee
Reply all
Reply to author
Forward
0 new messages