From 7ee6c33b71297b9140d0f95a55a61d4d2febd1b7 Mon Sep 17 00:00:00 2001 From: Ivan Ogasawara Date: Thu, 21 Dec 2023 21:35:54 -0400 Subject: [PATCH] fix test for macos ci --- tests/test_core.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/test_core.py b/tests/test_core.py index fb60882..14fad9d 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -55,7 +55,14 @@ def teardown(self): def test_temp_dir(self): """Test the temp_dir created by the setup.""" - assert self.temp_dir.name == str(Path(".").absolute()) + tmp_dir = self.temp_dir.name + cwd = str(Path(".").absolute()) + + cwd_undesired_prefix = "/private" + + if cwd.startswith(cwd_undesired_prefix): + cwd = cwd[len(cwd_undesired_prefix) :] + assert tmp_dir == cwd def test_draft(self): """Test draft method."""