@@ -59,7 +59,6 @@ async def test_dirty_git_aborts(tmp_path):
5959 await submit_module .submit (
6060 cluster = "rorqual" ,
6161 job_script = "scripts/job.sh" ,
62- no_sync = False ,
6362 rest = [],
6463 )
6564 assert exc_info .value .code == 1
@@ -87,7 +86,6 @@ async def test_submit_builds_correct_remote_command(tmp_path):
8786 await submit_module .submit (
8887 cluster = "rorqual" ,
8988 job_script = "scripts/job.sh" ,
90- no_sync = False ,
9189 rest = ["--" , "python" , "train.py" ],
9290 )
9391
@@ -120,7 +118,6 @@ async def test_sbatch_flags_forwarded(tmp_path):
120118 await submit_module .submit (
121119 cluster = "rorqual" ,
122120 job_script = "scripts/job.sh" ,
123- no_sync = False ,
124121 rest = ["--partition=gpu" , "--mem=40G" , "--" , "python" , "train.py" ],
125122 )
126123
@@ -153,7 +150,6 @@ async def test_rest_without_separator_treated_as_sbatch_flags(tmp_path):
153150 await submit_module .submit (
154151 cluster = "rorqual" ,
155152 job_script = "scripts/job.sh" ,
156- no_sync = False ,
157153 rest = ["--gres=gpu:1" ],
158154 )
159155
@@ -184,7 +180,6 @@ async def test_submit_includes_global_slurm_vars(tmp_path):
184180 await submit_module .submit (
185181 cluster = "rorqual" ,
186182 job_script = "scripts/job.sh" ,
187- no_sync = False ,
188183 rest = ["--" , "python" , "train.py" ],
189184 )
190185
@@ -213,7 +208,6 @@ async def test_submit_per_cluster_vars_override_globals(tmp_path):
213208 await submit_module .submit (
214209 cluster = "rorqual" ,
215210 job_script = "scripts/job.sh" ,
216- no_sync = False ,
217211 rest = ["--" , "python" , "train.py" ],
218212 )
219213
@@ -224,40 +218,7 @@ async def test_submit_per_cluster_vars_override_globals(tmp_path):
224218 assert "SBATCH_TIME=1:00:00" in cmd
225219
226220
227- # ---------------------------------------------------------------------------
228- # --no-sync skips sync and calls RemoteV2.connect instead
229- # ---------------------------------------------------------------------------
230-
231-
232- async def test_no_sync_skips_sync (tmp_path ):
233- fake_remote = AsyncMock ()
234- pyproject = tmp_path / "proj" / "pyproject.toml"
235- (tmp_path / "proj" ).mkdir ()
236-
237- mock_connect = AsyncMock (return_value = fake_remote )
238- mock_sync = AsyncMock (return_value = [fake_remote ])
239-
240- with (
241- patch .object (submit_module .subprocess , "run" , side_effect = _git_clean_run ),
242- patch .object (submit_module .subprocess , "check_output" , return_value = FAKE_COMMIT ),
243- patch .object (submit_module , "sync" , mock_sync ),
244- patch .object (submit_module .RemoteV2 , "connect" , mock_connect ),
245- patch .object (submit_module , "get_config" , return_value = _make_config ()),
246- patch .object (submit_module , "find_pyproject" , return_value = pyproject ),
247- patch .object (Path , "home" , return_value = tmp_path ),
248- ):
249- await submit_module .submit (
250- cluster = "rorqual" ,
251- job_script = "scripts/job.sh" ,
252- no_sync = True ,
253- rest = [],
254- )
255-
256- mock_sync .assert_not_called ()
257- mock_connect .assert_called_once_with ("rorqual" )
258-
259-
260- async def test_sync_called_by_default (tmp_path ):
221+ async def test_always_syncs (tmp_path ):
261222 fake_remote = AsyncMock ()
262223 pyproject = tmp_path / "proj" / "pyproject.toml"
263224 (tmp_path / "proj" ).mkdir ()
@@ -275,7 +236,6 @@ async def test_sync_called_by_default(tmp_path):
275236 await submit_module .submit (
276237 cluster = "rorqual" ,
277238 job_script = "scripts/job.sh" ,
278- no_sync = False ,
279239 rest = [],
280240 )
281241
@@ -303,7 +263,6 @@ async def test_git_commit_always_injected(tmp_path):
303263 await submit_module .submit (
304264 cluster = "rorqual" ,
305265 job_script = "scripts/job.sh" ,
306- no_sync = False ,
307266 rest = [],
308267 )
309268
0 commit comments