]> git.scottworley.com Git - paperdoorknob/commitdiff
fetch: test: Explicitly close webserver
authorScott Worley <scottworley@scottworley.com>
Thu, 23 Nov 2023 20:54:43 +0000 (12:54 -0800)
committerScott Worley <scottworley@scottworley.com>
Wed, 20 Dec 2023 01:37:10 +0000 (17:37 -0800)
This fixes "unclosed <socket.socket ..." warnings

paperdoorknob_test.py

index cf945d60faec978ef258eb3396224398944688e7..c2fce2b5083c9f1d655ae8b9eb6e0fc25da6dd0c 100644 (file)
@@ -46,6 +46,7 @@ class TestFetch(unittest.TestCase):
     def tearDown(self) -> None:
         self._web_server.shutdown()
         self._thread.join()
     def tearDown(self) -> None:
         self._web_server.shutdown()
         self._thread.join()
+        self._web_server.server_close()
 
     def testFetch(self) -> None:
         paperdoorknob.fetch(f"http://localhost:{self._port()}", TIMEOUT)
 
     def testFetch(self) -> None:
         paperdoorknob.fetch(f"http://localhost:{self._port()}", TIMEOUT)