Skip to content

Commit

Permalink
use empty string if no url
Browse files Browse the repository at this point in the history
  • Loading branch information
bluegenes committed May 20, 2024
1 parent 32f66ae commit d0a3a74
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/directsketch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ pub fn failures_handle(
accession,
name,
moltype,
url.expect("Can't convert url").as_str()
url.map(|u| u.to_string()).unwrap_or("".to_string())
);
// Attempt to write each record
if let Err(e) = writer.write_all(record.as_bytes()).await {
Expand Down
3 changes: 2 additions & 1 deletion tests/test_gbsketch.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,9 +403,10 @@ def test_gbsketch_bad_acc_fail(runtmp, capfd):
print(captured.out)
print(captured.err)
assert "Error: No signatures written, exiting." in captured.err


def test_gbsketch_version_bug(runtmp):
# test for bug where we didn't check version correctly
acc_csv = get_test_data('acc-version.csv')
output = runtmp.output('simple.zip')
failed = runtmp.output('failed.csv')
Expand Down

0 comments on commit d0a3a74

Please sign in to comment.