Failed: running test on fresh django main branch (4.1): honor_umask


I’m pretty new here. I’m trying to follow all the tutorial from Django official website. I’m stuck after trying my best to find an answer to my problem. Any help is welcome.

Basically, I’ve follow everything from: Writing your first patch for Django | Django documentation | Django

$ cd repo
$ git clone --depth 1
$ python3 -m venv ~/.virtualenvs/djangodev
$ source ~/.virtualenvs/djangodev/bin/activate
$ python -m pip install -e ./django/
$ cd django/test
$ python -m pip install -r requirements/py3.txt
$ python ./  ## can't run ./ without python command

On my Ubuntu 21.10 with python 3.9.7 , I got one error doing the test:

FAIL: test_honor_umask (admin_scripts.tests.StartProject) []
Traceback (most recent call last):
  File "/usr/lib/python3.9/unittest/", line 59, in testPartExecutor
  File "/usr/lib/python3.9/unittest/", line 499, in subTest
  File "/home/dave/pCloudDrive/Python/PersoPrj/DjangoLinux/repo/django/tests/admin_scripts/", line 2797, in test_honor_umask
  File "/usr/lib/python3.9/unittest/", line 829, in assertEqual
    assertion_func(first, second, msg=msg)
  File "/usr/lib/python3.9/unittest/", line 822, in _baseAssertEqual
    raise self.failureException(msg)
AssertionError: 384 != 448

Ran 15637 tests in 112.346s

FAILED (failures=1, skipped=1234, expected failures=5)

I would like very much to continue and explore Django, but can’t find any answer to my problem.

Thank you very much

Hi, did you manage to solve this? It seems like a permissions error. It may be worth adjusting the test to work in more scenarios.

Unfortunatly no, I just give up because it was a dead end for me! When you say “worth adjusting the test” do you mean that I should do something about configuring the test?

I maen it might be possible to change the test code to work for your setup. Since it’s a permissions issue, there may be an easy tweak to make around the setup or expected value.

Consider filing a ticket - the fellows may have some input.