Hello,
I've started working on #22130, the deprecation of fix_ampersands, but I'm running into some trouble with building the tests. I imagine there's someone on this list with more experience in this, who might be able to help.
My current patch is at
https://github.com/erikr/django/compare/deprecate-fix-ampersands?expand=1
The issue is that when running the full test suite, my test to assert that warnings are being issued, fails:
======================================================================
FAIL: test_fix_ampersands (utils_tests.test_html.TestUtilsHtml)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/erik/dev/django/tests/utils_tests/test_html.py", line 157, in test_fix_ampersands
self.assertEqual(len(w), 18)
AssertionError: 0 != 18
----------------------------------------------------------------------
Curiously, when I run this test independently, or when I run utils_tests independently, this test succeeds. Perhaps there is some interaction with other tests in the suite?
Direct link to the test in question:
https://github.com/erikr/django/compare/deprecate-fix-ampersands?expand=1#diff-adcabff46f848a5dece079381c6d9485R134
I've mostly looked at existing tests for deprecation for my modifications of this one - perhaps there's something I've overlooked that might cause my problem. If anyone could have a look, it would be much appreciated :)
cheers,
Erik