summaryrefslogtreecommitdiff
path: root/tests/dispatch
AgeCommit message (Collapse)Author
2025-07-23Refs #36500 -- Rewrapped long docstrings and block comments via a script.django-bot
Rewrapped long docstrings and block comments to 79 characters + newline using script from https://github.com/medmunds/autofix-w505.
2025-04-23Fixed #35801 -- Prevented collision of senders with non-overlapping lifetimes.Simon Charette
As documented, the id() function can return the same value for distinct objects with non-overlapping lifetimes which can result in signals being sent to the wrong receivers if two distinct senders happen to have a colliding id() value. Since reproduction of the issue requires memory constrained circumstances where the same exact id() is reused for two senders of the same signal the test opt to simulate the collision by systematically making the same id for Sender instances. Note that we explicitly avoid keeping a strong reference to senders that cannot be weakly referenced as that would unexpectedly prevent them from being garbage collected. This means that id(sender) collisions could still occur for such objects but Django itself doesn't make use of them. Thanks Sjoerd Job Postmus for the reduced test case and Mariusz for the review. Co-authored-by: And Clover <and@doxdesk.com>
2023-12-06Refs #34986 -- Moved garbage_collect() helper to django.test.utils.Nick Pope
2023-11-27Refs #34986 -- Added django.utils.version.PYPY.Nick Pope
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2021-06-25Refs #32508 -- Raised ImproperlyConfigured/TypeError instead of using ↵Mateo Radman
"assert" in various code.
2020-12-15Fixed #32261 -- Added error logging to Signal.send_robust().Ayush Bansal
2020-03-05Fixed #31327 -- Deprecated providing_args argument for Signal.Jon Dufresne
2019-12-19Refs #28954 -- Removed remaining Jython-specific code from dispatch tests.Nick Pope
Missed in 23b21db31bfcf2a065d485617412cca43a311a4c.
2017-01-19Refs #23919 -- Stopped inheriting from object to define new style classes.Simon Charette
2017-01-17Refs #24205 -- Removed Signal.disconnect()'s weak argument.Tim Graham
Per deprecation timeline.
2016-11-22Completed django.dispatch test coverage.Adam Chainz
2016-11-14Fixed E305 flake8 warnings.Ramin Farajpour Cami
2015-04-27Used assertIsInstance in tests.Alasdair Nicol
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2015-01-02Added return value to Signal.disconnect().Andriy Sokolovskiy
2015-01-02Renamed an assertion in the dispatch tests.Tim Graham
2014-07-07Removed unnecessary directory in dispatch tests.Tim Graham
2014-07-07Fixed #22909 -- Removed camelCasing in some tests.Tim Graham
Thanks brylie.
2014-05-16Fixed #16245 -- Included traceback in send_robust()'s responseUnai Zalakain
Exceptions from the (receiver, exception) tuples returned by ``send_robust()`` now have always their traceback attached as their ``__traceback__`` argument.
2014-02-05Fixed #21952 -- signals deadlock due to locking + weakref interactionAnssi Kääriäinen
2014-01-09Fixed removal of signal receivers in Python 3.4Florian Apolloner
Make use of `weakref.finalize` and `weakref.WeakMethod` on python 3.4. Simplified the removal of receivers, the old function looked overly complicated. Many thanks go to Antoine Pitrou for helping me to debug and explain all the failures I ran into while writing that patch.
2013-12-17Removed superfluous models.py files.Aymeric Augustin
Added comments in the three empty models.py files that are still needed. Adjusted the test runner to add applications corresponding to test labels to INSTALLED_APPS even when they don't have a models module.
2013-11-02PEP8 cleanupJason Myers
Signed-off-by: Jason Myers <jason@jasonamyers.com>
2013-10-26Fix all violators of E231Alex Gaynor
2013-10-23Fixed E225 pep8 warnings.Tim Graham
2013-09-09Removed unneeded imports in tests's __init__.py and unified them.Florian Apolloner
2013-08-20Fixed #20943 -- Weakly reference senders when caching their associated receiversSimon Charette
2013-07-29Removed most of absolute_import importsClaude Paroz
Should be unneeded with Python 2.7 and up. Added some unicode_literals along the way.
2013-07-01Stopped using django.utils.unittest in the test suite.Aymeric Augustin
Refs #20680.
2013-05-21Use assertIsInstance in tests.Marc Tamlyn
Gives much nicer errors when it fails.
2013-02-26Merged regressiontests and modeltests into the test root.Florian Apolloner