Skip to content
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

Python unittest structure #1245

Merged
merged 1 commit into from
Aug 22, 2024

Conversation

dokterbob
Copy link
Collaborator

@dokterbob dokterbob commented Aug 20, 2024

pytest-based infrastructure for running blazingly fast unit tests (seconds) on the backend, in addition to end to end test.

I have used aider to write some initial tests for core functionality (context, emitter, user_session).

Coverage isn't nearly complete, also as I hit some potential bugs which are way beyond the scope of this already quite outsized patch. More tests are in the pipeline, obviously.

For now, I propose this to have infra allowing us to require coverage on modified code and regressions for bugs. That should allow us to significantly bump up velocity while unblocking maintainers. It also paves the way to run tests on multiple versions of Python #1214, FastAPI etc., allowing us to broaden support.

Closes #1134.

@dokterbob dokterbob force-pushed the python_unittest_structure branch 2 times, most recently from 145f3d1 to e003a63 Compare August 20, 2024 15:40
@dokterbob dokterbob force-pushed the python_unittest_structure branch from 47291f3 to b0c3e11 Compare August 20, 2024 16:06
@dokterbob dokterbob added the backend Pertains to the Python backend. label Aug 22, 2024
@dokterbob dokterbob merged commit 1affa12 into Chainlit:main Aug 22, 2024
5 checks passed
@dokterbob dokterbob deleted the python_unittest_structure branch August 22, 2024 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Pertains to the Python backend.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Infrastructure for unit tests
2 participants