From 113beca2f237d38939ca7f8da770ed70e2210206 Mon Sep 17 00:00:00 2001 From: Cody Baker <51133164+CodyCBakerPhD@users.noreply.github.com> Date: Wed, 1 Nov 2023 14:36:17 -0400 Subject: [PATCH] add test --- dandi/tests/test_organize.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/dandi/tests/test_organize.py b/dandi/tests/test_organize.py index 804b992ad..a89d15267 100644 --- a/dandi/tests/test_organize.py +++ b/dandi/tests/test_organize.py @@ -387,3 +387,23 @@ def test_organize_required_field(simple2_nwb: Path, tmp_path: Path) -> None: tmp_path / dandiset_metadata_file, tmp_path / "sub-mouse001" / "sub-mouse001_ses-session-id1.nwb", ] + + +def test_organize_single_job(simple2_nwb: Path, tmp_path: Path) -> None: + (tmp_path / dandiset_metadata_file).write_text("{}\n") + r = CliRunner().invoke( + organize, + [ + "-f", + "copy", + "--dandiset-path", + str(tmp_path), + "--jobs", + 1, + ], + ) + assert r.exit_code == 0 + assert list_paths(tmp_path) == [ + tmp_path / dandiset_metadata_file, + tmp_path / "sub-mouse001" / "sub-mouse001_ses-session-id1.nwb", + ]