mirror of
https://github.com/django/django.git
synced 2025-10-28 16:16:12 +00:00
[3.2.x] Refs #31732 -- Fixed django.utils.inspect caching for bound methods.
Thanks Alexandr Artemyev for the report, and Simon Charette for the
original patch.
Backport of 562898034f from main
This commit is contained in:
committed by
Mariusz Felisiak
parent
2420fd2d5c
commit
15a8518388
@@ -22,6 +22,16 @@ class Person:
|
||||
|
||||
|
||||
class TestInspectMethods(unittest.TestCase):
|
||||
def test_get_callable_parameters(self):
|
||||
self.assertIs(
|
||||
inspect._get_callable_parameters(Person.no_arguments),
|
||||
inspect._get_callable_parameters(Person.no_arguments),
|
||||
)
|
||||
self.assertIs(
|
||||
inspect._get_callable_parameters(Person().no_arguments),
|
||||
inspect._get_callable_parameters(Person().no_arguments),
|
||||
)
|
||||
|
||||
def test_get_func_full_args_no_arguments(self):
|
||||
self.assertEqual(inspect.get_func_full_args(Person.no_arguments), [])
|
||||
self.assertEqual(inspect.get_func_full_args(Person().no_arguments), [])
|
||||
|
||||
Reference in New Issue
Block a user