diff --git a/tests/st/troubleshooter/widget/test_save_convert.py b/tests/st/troubleshooter/widget/test_save_convert.py index a5e9cc70365d27f01cad783c559425e9dddcd689..b1358dcdf4ca414f29858e5d05b0230ea1cae2b1 100644 --- a/tests/st/troubleshooter/widget/test_save_convert.py +++ b/tests/st/troubleshooter/widget/test_save_convert.py @@ -18,7 +18,7 @@ def test_save_convert(file): Expectation: success """ tmp_dir = TemporaryDirectory() - path = Path(tmp_dir.name) + path = Path(tmp_dir.name) / "multi" / "dir" ts.widget.save_convert(file, path) time.sleep(0.1) except_a = np.array([2, 3, 4, 5], dtype=np.float32) diff --git a/troubleshooter/troubleshooter/widget/save_convert.py b/troubleshooter/troubleshooter/widget/save_convert.py index 7bf0e54875e663f0a10fda704dac2dc54256802f..70c16b7e36af28c29f5f096b4b6c562d8fa79266 100644 --- a/troubleshooter/troubleshooter/widget/save_convert.py +++ b/troubleshooter/troubleshooter/widget/save_convert.py @@ -42,7 +42,7 @@ if "mindspore" in FRAMEWORK_TYPE: self.path = Path() self.output_path = Path(output_path) if not self.output_path.exists(): - self.output_path.mkdir(mode=0o700) + self.output_path.mkdir(mode=stat.S_IRWXU, parents=True, exist_ok=True) self.name = "" self.auto_id = -1