From 5009009363644ae61e810a360ade9f174b5bbeaa Mon Sep 17 00:00:00 2001 From: Manuel Cortez Date: Wed, 23 Feb 2022 11:20:00 -0600 Subject: [PATCH] Fix tests for paths on mac --- test/test_paths.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/test_paths.py b/test/test_paths.py index f05211a..a829981 100644 --- a/test/test_paths.py +++ b/test/test_paths.py @@ -45,7 +45,9 @@ def test_app_path(): old_value = paths.is_mac paths.is_mac = True sys.frozen = True - mac_result = paths.app_path() - assert mac_result == os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), "..", "..", "..", "..")) + with mock.patch("updater.paths.executable_directory", return_value="/path/to/content/resources"): + mac_result = paths.app_path() + assert mac_result == os.path.abspath(os.path.join("/path", "to")) + paths.is_mac = old_value del sys.frozen \ No newline at end of file