Skip to content
Snippets Groups Projects

catch the case where directory no longer exists

Merged Charlotte Hausman requested to merge fix_dir_not_exist_abort_error into main
3 files
+ 19
10
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with Workspaces. If not, see <https://www.gnu.org/licenses/>.
from datetime import datetime
from unittest.mock import patch
from unittest.mock import patch, MagicMock
from test.test_workflow_info import FakeWorkflowInfo
from workspaces.system.schema import AbstractFile
@@ -92,6 +92,7 @@ class TestCapoInjector:
@patch("pathlib.Path.unlink")
@patch("glob.glob")
@patch("os.listdir")
@patch("pathlib.Path.exists", MagicMock(return_value=True))
def test_clear_subspace(self, mock_os, mock_glob, mock_remove):
injector.clear_subspace()
assert mock_os.call_count == 1
Loading