Please help me with "Writing your first patch for Django"

104 views
Skip to first unread message

Carlos Mermingas

unread,
Dec 17, 2016, 10:49:21 AM12/17/16
to Django developers (Contributions to Django itself)
I absolutely love Django and I would like to contribute. After slowly reading some of the material on how to get started, I just went through the "Writing your first patch for Django" tutorial. I am using Python 3.5 and I have a few questions:

(1) When I run the tests, I get 4 failures and 856 skipped tests... Is it appropriate to ignore these?

Ran 9637 tests in 204.885s
FAILED (failures=4, skipped=856, expected failures=6)

3 failures are related to deprecation warnings and 1 failure is not.

(2) The 1 failure that's not related to deprecation warnings passes if I run the test by itself. Is this expected and how can I get to work with the other tests?

As part of the test suite:

FAIL: test_only_new_files (utils_tests.test_autoreload.TestFilenameGenerator)

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

Traceback (most recent call last):

  File "/Users/cmermingas/django_dev/django/tests/utils_tests/test_autoreload.py", line 87, in test_only_new_files

    self.assertEqual(len(filenames2), 1)

AssertionError: 0 != 1


By itself:

./runtests.py utils_tests.test_autoreload.TestFilenameGenerator.test_only_new_files

Testing against Django installed in '/Users/cmermingas/django_dev/django/django'

Creating test database for alias 'default'...

Creating test database for alias 'other'...

.

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

Ran 1 test in 0.046s


OK


That's it for now. Thanks a lot!

Tim Graham

unread,
Dec 17, 2016, 11:27:14 AM12/17/16
to Django developers (Contributions to Django itself)
1. As the tutorial says, "Some tests are specific to a particular database backend and will be skipped if not testing with that backend." No problem there.

2. Can you reproduce those failures on master? If not, it's nothing to worry about.

Adam Johnson

unread,
Dec 17, 2016, 1:08:23 PM12/17/16
to django-d...@googlegroups.com
Also you might be experiencing failures specific to your operating system and database setup - if you'd paste the stack traces we might be able to figure more out.
--


You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.


To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.


To post to this group, send email to django-d...@googlegroups.com.


Visit this group at https://groups.google.com/group/django-developers.


To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/e3b2689c-1326-43be-b3e1-abc235bc6f5a%40googlegroups.com.


For more options, visit https://groups.google.com/d/optout.


Florian Apolloner

unread,
Dec 18, 2016, 9:15:54 AM12/18/16
to Django developers (Contributions to Django itself)


On Saturday, December 17, 2016 at 7:08:23 PM UTC+1, Adam Johnson wrote:
Also you might be experiencing failures specific to your operating system and database setup - if you'd paste the stack traces we might be able to figure more out.

That appears to be the full stack trace since it errors out in the assert :D

@Carios: Which operating system are you on, which python version etc… and can you try running the failing test with --pair/--bisect so we can find out which other testcase leaks state.

cheers,
Florian

Adam Johnson

unread,
Dec 18, 2016, 9:51:49 AM12/18/16
to Django developers (Contributions to Django itself)
That appears to be the full stack trace since it errors out in the assert :D
Oh yes, my bad, I'm used to pytest ;)
Reply all
Reply to author
Forward
0 new messages