From: Vladimír Vondruš Date: Mon, 11 May 2020 10:25:00 +0000 (+0200) Subject: documentation/python: repro case for another Py3.6-specific typing thing. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=a2d35e38e5246ac8771da40aafbd50effbb0a6ab;p=blog.git documentation/python: repro case for another Py3.6-specific typing thing. --- 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, "