Skip to content

Commit

Permalink
fix tests :)
Browse files Browse the repository at this point in the history
  • Loading branch information
ctb committed Jun 16, 2021
1 parent aaa4548 commit 9b50748
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/sourmash/sig/picklist.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
preprocess['md5'] = lambda x: x

# identifier matches/prefix foo - space delimited identifiers
preprocess['ident.'] = lambda x: x.split(' ')[0].split('.')[0]
preprocess['identprefix'] = lambda x: x.split(' ')[0].split('.')[0]
preprocess['ident'] = lambda x: x.split(' ')[0]

# match 8 characters
Expand Down Expand Up @@ -79,8 +79,10 @@ def _get_sig_attribute(self, ss):
q = ss.name
elif coltype == 'ident':
q = ss.name
elif coltype == 'ident.':
elif coltype == 'identprefix':
q = ss.name
else:
assert 0

return q

Expand Down
2 changes: 1 addition & 1 deletion tests/test_cmd_signature.py
Original file line number Diff line number Diff line change
Expand Up @@ -1222,7 +1222,7 @@ def test_sig_extract_8_picklist_ident_dot(runtmp):
w.writeheader()
w.writerow(row)

picklist_arg = f"{picklist_csv}:nodotIdent:ident."
picklist_arg = f"{picklist_csv}:nodotIdent:identprefix"
runtmp.sourmash('sig', 'extract', sig47, sig63, '--picklist', picklist_arg)

# stdout should be new signature
Expand Down

0 comments on commit 9b50748

Please sign in to comment.