Hi everyone!
I’m setting up Django locally to start contributing. I cloned the repository and ran the full test suite on the main branch without making any code changes on linux (ubuntu 24.04).
.
I got this response at the end with some error stack trace:
Ran 18993 tests in 323.469s
FAILED (failures=2, errors=1, skipped=1402, expected failures=5)
.
The formatted errors using llm due to readability are:
1. SMTP Email Error
Test:
mail.tests.SMTPBackendTests.test_avoids_sending_to_invalid_addresses
Error:
Crashes inside Python’s standard email/_header_value_parser.py with email.errors.HeaderParseError: expected ':' at end of group display name but found '@', followed by an IndexError: string index out of range.
2. HTML Strip Tags Error
Test:
utils_tests.test_html.TestUtilsHtml.test_strip_tags
Error:
Fails with an AssertionError on two highly malformed HTML strings (><!&&&&... and ><a<a<a...). It looks like the output from Python’s built-in html.parser doesn’t match the hardcoded test assertions.
.
Question:
Are these known compatibility issues between Python 3.12.3’s stricter parsers and the current test assertions on main?
Should I just exclude these specific tests locally for now, or is there an environment configuration I might be missing?
Thanks.