(self)
| 112 | protocol = "http" |
| 113 | |
| 114 | def __init__(self) -> None: |
| 115 | self.PORT = find_free_port() |
| 116 | self.EMPTY_PAGE = f"{self.protocol}://localhost:{self.PORT}/empty.html" |
| 117 | self.PREFIX = f"{self.protocol}://localhost:{self.PORT}" |
| 118 | self.CROSS_PROCESS_PREFIX = f"{self.protocol}://127.0.0.1:{self.PORT}" |
| 119 | # On Windows, this list can be empty, reporting text/plain for scripts. |
| 120 | mimetypes.add_type("text/html", ".html") |
| 121 | mimetypes.add_type("text/css", ".css") |
| 122 | mimetypes.add_type("application/javascript", ".js") |
| 123 | mimetypes.add_type("image/png", ".png") |
| 124 | mimetypes.add_type("font/woff2", ".woff2") |
| 125 | |
| 126 | def __repr__(self) -> str: |
| 127 | return self.PREFIX |
nothing calls this directly
no test coverage detected