From 389cc064ea9f15e2375fdc6d4e9a69b1ac62f98d Mon Sep 17 00:00:00 2001 From: Godmar Back Date: Wed, 12 Aug 2020 13:36:15 -0400 Subject: [PATCH] properly resolve symlinks if test script is symlinked --- tests/server_unit_test_pserv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/server_unit_test_pserv.py b/tests/server_unit_test_pserv.py index 4ff8fe6..f8e5656 100755 --- a/tests/server_unit_test_pserv.py +++ b/tests/server_unit_test_pserv.py @@ -22,7 +22,7 @@ from socket import error as SocketError from http.client import OK, NOT_FOUND, FORBIDDEN, METHOD_NOT_ALLOWED, NOT_IMPLEMENTED, HTTPConnection random.seed(42) -script_dir = "/".join(__file__.split("/")[:-1]) +script_dir = "/".join(os.path.realpath(__file__).split("/")[:-1]) if script_dir == "": script_dir = "." script_dir = os.path.realpath(script_dir)