From 439f75afd256ae259a72e39d1cf0e31711b94a85 Mon Sep 17 00:00:00 2001 From: Keewis Date: Tue, 18 Aug 2020 16:01:52 +0200 Subject: [PATCH] enable preprocessing in the tests --- tests/test_ext_napoleon_docstring.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_ext_napoleon_docstring.py b/tests/test_ext_napoleon_docstring.py index 538227514..da456e4a2 100644 --- a/tests/test_ext_napoleon_docstring.py +++ b/tests/test_ext_napoleon_docstring.py @@ -1543,6 +1543,7 @@ arg_ : type config = Config( napoleon_use_param=True, napoleon_use_rtype=True, + napoleon_preprocess_types=True, napoleon_type_aliases=translations, ) actual = str(NumpyDocstring(docstring, config)) @@ -1566,7 +1567,7 @@ arg_ : type "scalar": ":term:`scalar`", "array-like": ":class:`array-like `", } - config = Config(napoleon_type_aliases=translations) + config = Config(napoleon_type_aliases=translations, napoleon_preprocess_types=True) app = mock.Mock() actual = str(NumpyDocstring(docstring, config, app, "method")) self.assertEqual(expected, actual) @@ -1779,7 +1780,7 @@ Example Function "CustomError": "package.CustomError", "AnotherError": ":py:exc:`~package.AnotherError`", } - config = Config(napoleon_type_aliases=translations) + config = Config(napoleon_type_aliases=translations, napoleon_preprocess_types=True) app = mock.Mock() actual = str(NumpyDocstring(docstring, config, app, "method")) self.assertEqual(expected, actual)