]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.14] gh-149663: fix typo in `unittest` docs (GH-149670) (#149673)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 11 May 2026 12:01:57 +0000 (14:01 +0200)
committerGitHub <noreply@github.com>
Mon, 11 May 2026 12:01:57 +0000 (12:01 +0000)
gh-149663: fix typo in `unittest` docs (GH-149670)

`hastattr` -> `hasattr`
(cherry picked from commit 4956d2be9d5e555f2cf64faed9ef39e6a797c360)

Co-authored-by: Árni Már Jónsson <arnimarj@gmail.com>
Doc/library/unittest.rst

index d12bd0744a4c921aeb08b9581f0cc5566b61a6a4..977ae3efdd6c0486b664e6af1e78e5c5214c20ef 100644 (file)
@@ -1237,10 +1237,10 @@ Test cases
    | :meth:`assertNotEndsWith(a, b)        | ``not a.endswith(b)``          | 3.14         |
    | <TestCase.assertNotEndsWith>`         |                                |              |
    +---------------------------------------+--------------------------------+--------------+
-   | :meth:`assertHasAttr(a, b)            | ``hastattr(a, b)``             | 3.14         |
+   | :meth:`assertHasAttr(a, b)            | ``hasattr(a, b)``              | 3.14         |
    | <TestCase.assertHasAttr>`             |                                |              |
    +---------------------------------------+--------------------------------+--------------+
-   | :meth:`assertNotHasAttr(a, b)         | ``not hastattr(a, b)``         | 3.14         |
+   | :meth:`assertNotHasAttr(a, b)         | ``not hasattr(a, b)``          | 3.14         |
    | <TestCase.assertNotHasAttr>`          |                                |              |
    +---------------------------------------+--------------------------------+--------------+