Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@shabani1
Copy link
Contributor

@shabani1 shabani1 commented Mar 1, 2024

What

  • Refactored lexy-py tests to use the new testing configuration
    • Use test instances of DB, IndexManager, and Celery
  • Upgraded FastAPI and Starlette
    • Resolves an issue with Starlette's TestClient class
  • Added ASGI lifespan manager
    • Used for launching and shutting down IndexManager during tests
  • Updated test fixtures
    • Fixtures for test_app, lx_client and lx_async_client
    • client fixture is now function scoped
    • seed_data is now a requirement of the test_app fixture
  • New packages
    • asgi-lifespan for testing

Remaining TODOs related to testing:

  • Move the logic in tutorial.ipynb and tests.ipynb into the new testing framework
  • Add more tests for the server
    • Bindings, Indexes, Transformers

Why

lexy-py tests were still using the main lexy database.

Test plan

  • Run make run-tests and verify that all tests pass
  • Run examples/tests.ipynb and verify that there are no errors
  • Run examples/tutorial.ipynb and verify that the tutorial works as expected
  • Run examples/images.ipynb and verify that the tutorial works as expected

Misc

Contains new packages, so make sure to rebuild dev containers after pulling.

make update-dev-containers

@shabani1 shabani1 merged commit 17213bc into main Mar 1, 2024
@shabani1 shabani1 deleted the rs/refactor-tests-for-python-client branch March 1, 2024 02:29
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.

1 participant