pentoo-overlay/dev-python/eventlet/files/eventlet-0.30.0-tests-socket.patch
2022-01-12 15:58:08 +08:00

13 lines
607 B
Diff

Let's use TMPDIR as the base for this test's unix socket to help it pass.
We set TMPDIR in the ebuild to ${T}.
--- a/tests/backdoor_test.py
+++ b/tests/backdoor_test.py
@@ -47,7 +47,7 @@ class BackdoorTest(tests.LimitedTestCase):
self._run_test_on_client_and_server(client, serv)
def test_server_on_unix_socket(self):
- SOCKET_PATH = '/tmp/eventlet_backdoor_test.socket'
+ SOCKET_PATH = os.getenv('TMPDIR', '/tmp') + '/eventlet_backdoor_test.socket'
if os.path.exists(SOCKET_PATH):
os.unlink(SOCKET_PATH)
listener = socket.socket(socket.AF_UNIX)