Remove unused code
This commit is contained in:
		| @@ -83,7 +83,6 @@ class ParallelHTTPServer(socketserver.ThreadingMixIn, | |||||||
|         return super().finish_request(request, client_address) |         return super().finish_request(request, client_address) | ||||||
|  |  | ||||||
|     def finish_request(self, request, client_address): |     def finish_request(self, request, client_address): | ||||||
|         """Don't overwrite this! (Modified by tests.)""" |  | ||||||
|         *client_address, client_socket = client_address |         *client_address, client_socket = client_address | ||||||
|         client_address = tuple(client_address) |         client_address = tuple(client_address) | ||||||
|         try: |         try: | ||||||
|   | |||||||
| @@ -21,33 +21,13 @@ Tests for Radicale. | |||||||
| """ | """ | ||||||
|  |  | ||||||
| import logging | import logging | ||||||
| import os |  | ||||||
| import sys | import sys | ||||||
| from io import BytesIO | from io import BytesIO | ||||||
|  |  | ||||||
| import defusedxml.ElementTree as DefusedET | import defusedxml.ElementTree as DefusedET | ||||||
| from pytest_cov import embed |  | ||||||
|  |  | ||||||
| import radicale | import radicale | ||||||
| from radicale import server, xmlutils | from radicale import xmlutils | ||||||
|  |  | ||||||
| # Measure coverage of forked processes |  | ||||||
| finish_request = server.ParallelHTTPServer.finish_request |  | ||||||
| pid = os.getpid() |  | ||||||
|  |  | ||||||
|  |  | ||||||
| def finish_request_cov(self, request, client_address): |  | ||||||
|     cov = None |  | ||||||
|     if pid != os.getpid(): |  | ||||||
|         cov = embed.init() |  | ||||||
|     try: |  | ||||||
|         return finish_request(self, request, client_address) |  | ||||||
|     finally: |  | ||||||
|         if cov: |  | ||||||
|             embed.cleanup(cov) |  | ||||||
|  |  | ||||||
|  |  | ||||||
| server.ParallelHTTPServer.finish_request = finish_request_cov |  | ||||||
|  |  | ||||||
| # Enable debug output | # Enable debug output | ||||||
| radicale.log.logger.setLevel(logging.DEBUG) | radicale.log.logger.setLevel(logging.DEBUG) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Unrud
					Unrud