diff options
| author | Adam Johnson <me@adamj.eu> | 2021-03-19 11:23:28 +0000 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-03-22 20:49:15 +0100 |
| commit | 15a85183880ebebe1b4a1e16e9b2202897d27d8e (patch) | |
| tree | 8c164a33b02c8a08e7f9c53d8a997dda5d57398f /tests | |
| parent | 2420fd2d5c90698454678c81f3f5a7662be2bf72 (diff) | |
[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 562898034f65e17bcdd2d951ac5236a1ec8ea690 from main
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/utils_tests/test_inspect.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/utils_tests/test_inspect.py b/tests/utils_tests/test_inspect.py index 9ea8ae84a4..ae83d675fe 100644 --- a/tests/utils_tests/test_inspect.py +++ b/tests/utils_tests/test_inspect.py @@ -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), []) |
