]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] gh-111724: Fix doctest `ResourceWarning` in `howto/descriptor.rst` (GH-111725...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 4 Nov 2023 19:56:08 +0000 (20:56 +0100)
committerGitHub <noreply@github.com>
Sat, 4 Nov 2023 19:56:08 +0000 (15:56 -0400)
gh-111724: Fix doctest `ResourceWarning` in `howto/descriptor.rst` (GH-111725)

Close database connection explicitly in test cleanup.
(cherry picked from commit f48e669504ce53040a04e0181064c11741a87817)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Doc/howto/descriptor.rst

index 1d9424cb735a462dc725d96d0010487976009e8a..0a7263614670a12cc39ac1c8f7ad4fa0ea10f75a 100644 (file)
@@ -943,6 +943,10 @@ it can be updated:
     >>> Movie('Star Wars').director
     'J.J. Abrams'
 
+.. testcleanup::
+
+   conn.close()
+
 
 Pure Python Equivalents
 ^^^^^^^^^^^^^^^^^^^^^^^