summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Rivera <rivera@joel.mx>2016-03-14 23:30:26 -0600
committerJoel Rivera <rivera@joel.mx>2016-03-14 23:30:26 -0600
commitfa5ec6eb7face12e97d39726a5d464f167ed8fed (patch)
tree2479dc9307b2ac51c42aa40a1036cc70f7393774
parent1e1dc4d2687302cf04e7a068f82c1ed99f9b2d8b (diff)
downloadcherrypy-fa5ec6eb7face12e97d39726a5d464f167ed8fed.tar.gz
Make sure we can run the unix socket test concurrently.
-rw-r--r--cherrypy/test/test_wsgi_unix_socket.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/cherrypy/test/test_wsgi_unix_socket.py b/cherrypy/test/test_wsgi_unix_socket.py
index 0a552bc5..7a829d51 100644
--- a/cherrypy/test/test_wsgi_unix_socket.py
+++ b/cherrypy/test/test_wsgi_unix_socket.py
@@ -8,12 +8,13 @@ import cherrypy
from cherrypy.test import helper
from cherrypy._cpcompat import HTTPConnection
+def usocket_path():
+ fd, path = tempfile.mkstemp('cp_test.sock')
+ os.close(fd)
+ os.remove(path)
+ return path
-USOCKET_PATH = os.path.join(
- tempfile.gettempdir(),
- 'cp_test.sock'
-)
-
+USOCKET_PATH = usocket_path()
class USocketHTTPConnection(HTTPConnection):
"""