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 13:17:54 +0100 |
| commit | 562898034f65e17bcdd2d951ac5236a1ec8ea690 (patch) | |
| tree | 334787b21eb650ba664628527532a4c4802691a4 /tests/utils_tests | |
| parent | ac72a216a7ef95e8e9cb8651b7e67320597c903b (diff) | |
Refs #31732 -- Fixed django.utils.inspect caching for bound methods.
Thanks Alexandr Artemyev for the report, and Simon Charette for the
original patch.
Diffstat (limited to 'tests/utils_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), []) |
