Skip to content

Commit aaa267c

Browse files
committed
Add test for copy inputs.
1 parent f7a2756 commit aaa267c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/unitary/default_setup/jobs/test_jobs_pytorch_ddp.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
55

66
import json
7+
import os
78
import unittest
89
import zipfile
910
from unittest import mock
@@ -148,3 +149,13 @@ def test_create_job_runs(self, patched_run, *args):
148149
},
149150
],
150151
)
152+
153+
@mock.patch.dict(
154+
os.environ, {utils.CONST_ENV_INPUT_MAPPINGS: json.dumps({INPUT_SRC: INPUT_DST})}
155+
)
156+
@mock.patch("os.makedirs")
157+
@mock.patch("fsspec.filesystem")
158+
def test_copy_inputs(self, fs, makedirs):
159+
utils.OCIHelper.copy_inputs()
160+
self.assertEqual(fs.call_args.args[0], "oci")
161+
self.assertEqual(makedirs.call_args.args[0], "data")

0 commit comments

Comments
 (0)