-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Collection state machine tests #324
Collection state machine tests #324
Conversation
chromadb/test/configurations.py
Outdated
chroma_db_impl="duckdb+parquet", | ||
persist_directory=tempfile.gettempdir() + "/tests", | ||
), | ||
# Settings( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Temporarily disabled to make tests faster, will re-enable before merging.
chromadb/test/property/strategies.py
Outdated
|
||
# TODO: build a strategy that constructs english sentences instead of gibberish strings | ||
# Unsure what would happen feeding random unicode to an embedding model, could get bad results | ||
|
||
document = st.from_type(Optional[str]) | ||
|
||
_coll_name_re = re.compile(r"^[a-zA-Z][a-zA-Z0-9-]{1,61}[a-zA-Z0-9]$") | ||
_coll_name_re = re.compile(r"^[a-zA-Z][a-zA-Z0-9-]{1,60}[a-zA-Z0-9]$") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will also fail until we merge #302
st.none(), | ||
st.dictionaries( | ||
st.text(), | ||
st.one_of(st.text(), st.integers(), st.floats(allow_infinity=False, allow_nan=False)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should capture the fact that infinity / nan cannot be in metadata
This reverts commit f48a07a. Going to use a different approach.
Saves a lot of time during testing by not re-constructing them all the time.
Fixes for collections property tests
Description of changes
New tests for collection manipulation using Hypothesis with a state machine.
Test plan
This change is the tests.
Documentation Changes
No user-facing documentation.