Skip to content

Commit

Permalink
fix: doctest
Browse files Browse the repository at this point in the history
  • Loading branch information
thorwhalen committed Jan 3, 2024
1 parent ffadb09 commit 75fea8a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ You can read or write one document at a time too.
>>> collection['cake'] = {
... "documents": "contents for cake",
... }
>>> list(collection)
['piece', 'of', 'cake']
>>> sorted(collection) # sorting because order is not guaranteed
['cake', 'of', 'piece']
>>> assert collection['cake'] == {
... 'ids': ['cake'],
... 'embeddings': None,
Expand Down
4 changes: 2 additions & 2 deletions chromadol/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@
>>> collection['cake'] = {
... "documents": "contents for cake",
... }
>>> list(collection)
['piece', 'of', 'cake']
>>> sorted(collection) # sorting because order is not guaranteed
['cake', 'of', 'piece']
>>> assert collection['cake'] == {
... 'ids': ['cake'],
... 'embeddings': None,
Expand Down
2 changes: 1 addition & 1 deletion chromadol/tests/base_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def test_simple():
collection['cake'] = {
"documents": "contents for cake",
}
assert list(collection) == ['piece', 'of', 'cake']
assert set(collection) == {'piece', 'of', 'cake'}
assert collection['cake'] == {
'ids': ['cake'],
'embeddings': None,
Expand Down

0 comments on commit 75fea8a

Please sign in to comment.