This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
ipc-unix/tests/__init__.py

15 lines
285 B
Python
Raw Normal View History

2018-12-07 23:34:59 +00:00
from ipc_unix.simple import Server
2018-12-07 20:35:34 +00:00
import tempfile
import os
2018-12-07 23:34:59 +00:00
class EchoServer(Server):
2018-12-07 20:35:34 +00:00
def handle_request(self, request):
return request
2018-12-07 23:18:29 +00:00
def get_temp_file_path() -> str:
2018-12-07 20:35:34 +00:00
_, temp_file_path = tempfile.mkstemp()
os.remove(temp_file_path)
return temp_file_path