Skip to content

Commit 750ddfa

Browse files
Fix line length linting errors in test_move.py
Co-authored-by: CodyCBakerPhD <51133164+CodyCBakerPhD@users.noreply.github.com>
1 parent 111b04a commit 750ddfa

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

dandi/tests/test_move.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,9 @@ def test_move_nonexistent_src(
374374
work_on=work_on,
375375
dandi_instance=moving_dandiset.api.instance_id,
376376
)
377+
asset_type = "remote" if work_on == MoveWorkOn.REMOTE else "local"
377378
assert str(excinfo.value) == (
378-
f"No asset at {'remote' if work_on == MoveWorkOn.REMOTE else 'local'} path 'subdir1/avocado.txt'. "
379+
f"No asset at {asset_type} path 'subdir1/avocado.txt'. "
379380
+ (
380381
"Verify the path is correct and the asset exists on the server. "
381382
"Use 'dandi ls' to list available assets."
@@ -405,10 +406,10 @@ def test_move_file_slash_src(
405406
work_on=work_on,
406407
dandi_instance=moving_dandiset.api.instance_id,
407408
)
408-
assert (
409-
str(excinfo.value)
410-
== f"{'Remote' if work_on == MoveWorkOn.REMOTE else 'Local'} path 'subdir1/apple.txt/' is a file but a directory was expected. "
411-
"Use a path ending with '/' for directories."
409+
path_type = "Remote" if work_on == MoveWorkOn.REMOTE else "Local"
410+
assert str(excinfo.value) == (
411+
f"{path_type} path 'subdir1/apple.txt/' is a file but a directory "
412+
"was expected. Use a path ending with '/' for directories."
412413
)
413414
check_assets(moving_dandiset, starting_assets, work_on, {})
414415

@@ -431,10 +432,10 @@ def test_move_file_slash_dest(
431432
work_on=work_on,
432433
dandi_instance=moving_dandiset.api.instance_id,
433434
)
434-
assert (
435-
str(excinfo.value)
436-
== f"{'Remote' if work_on == MoveWorkOn.REMOTE else 'Local'} path 'subdir1/apple.txt/' is a file but a directory was expected. "
437-
"Use a path ending with '/' for directories."
435+
path_type = "Remote" if work_on == MoveWorkOn.REMOTE else "Local"
436+
assert str(excinfo.value) == (
437+
f"{path_type} path 'subdir1/apple.txt/' is a file but a directory "
438+
"was expected. Use a path ending with '/' for directories."
438439
)
439440
check_assets(moving_dandiset, starting_assets, work_on, {})
440441

0 commit comments

Comments
 (0)