From a2d35e38e5246ac8771da40aafbd50effbb0a6ab Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 11 May 2020 12:25:00 +0200 Subject: [PATCH] documentation/python: repro case for another Py3.6-specific typing thing. --- .../inspect_annotations.AContainer.html | 59 +++++++++++++++++++ .../inspect_annotations.py | 2 + documentation/test_python/test_inspect.py | 3 + 3 files changed, 64 insertions(+) create mode 100644 documentation/test_python/inspect_annotations/inspect_annotations.AContainer.html diff --git a/documentation/test_python/inspect_annotations/inspect_annotations.AContainer.html b/documentation/test_python/inspect_annotations/inspect_annotations.AContainer.html new file mode 100644 index 00000000..4a447c39 --- /dev/null +++ b/documentation/test_python/inspect_annotations/inspect_annotations.AContainer.html @@ -0,0 +1,59 @@ + + + + + inspect_annotations.AContainer | My Python Project + + + + + +
+
+ + diff --git a/documentation/test_python/inspect_annotations/inspect_annotations.py b/documentation/test_python/inspect_annotations/inspect_annotations.py index b7e8218b..9c848094 100644 --- a/documentation/test_python/inspect_annotations/inspect_annotations.py +++ b/documentation/test_python/inspect_annotations/inspect_annotations.py @@ -23,6 +23,8 @@ _T = TypeVar('Tp') # Triggers a corner case with _gorg on Py3.6 (the member has to be ignored). # AContainer2 is not derived directly from Generic but has _gorg also. +# Additionally, on Py3.6 these classes will have a __next_in_mro__ member, +# which should be ignored as well class AContainer(Generic[_T]): """A generic class. No parent class info extracted yet.""" class AContainer2(Iterator): diff --git a/documentation/test_python/test_inspect.py b/documentation/test_python/test_inspect.py index 4fed48f3..b198c740 100644 --- a/documentation/test_python/test_inspect.py +++ b/documentation/test_python/test_inspect.py @@ -89,6 +89,9 @@ class Annotations(BaseInspectTestCase): self.assertEqual(*self.actual_expected_contents('inspect_annotations.Foo.html')) self.assertEqual(*self.actual_expected_contents('inspect_annotations.FooSlots.html')) + # This should not list any internal stuff from the typing module + self.assertEqual(*self.actual_expected_contents('inspect_annotations.AContainer.html')) + # https://github.com/python/cpython/pull/13394 @unittest.skipUnless(LooseVersion(sys.version) >= LooseVersion('3.7.4'), "signature with / for pow() is not present in 3.6, " -- 2.30.2