Skip to content

Unit Tests #91

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Unit Tests #91

wants to merge 3 commits into from

Conversation

FinnConnor
Copy link
Contributor

Added unit tests with Pytest can run pytest while in directory to run tests

Sets up by embedding two text files in testFiles folder (superbowl.txt and short.txt)

Tests getting IDs, deleting IDs, querying one and multiple IDs directly

Tests basic core functionality

@FinnConnor FinnConnor self-assigned this Oct 22, 2024
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put this and the test in a new directory called test

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done all test code & files in test

@rgknight
Copy link

I'd love to see a testing framework on this project and potentially contribute tests. We are experiencing some reliability issues and it would be nice to be able to define tests to iterate quickly on fixes.

A couple of questions:

Why camelCase the testFiles? That seems like an anti-pattern for the rest of the repo / LibreChat?

I could see the number of test files growing over time as folks find types of files that fail under different conditions. Maybe if / when that happens the approach of storing test files directly in the repo could be revisited.

test_api is a broad name. Should that be split into separate files for different services so the number of tests can expand over time? E.g., test_embed etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants