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

Test: write tests for file backed db #1230

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

Conversation

pedrocarlo
Copy link
Contributor

@pedrocarlo pedrocarlo commented Apr 2, 2025

First attempt at closing #1212. Also with this PR, I added the option of using with syntax for TestLimboShell. It automatically closes the shell on error, and facilitates error handling overall. If this is merged, I can update the other python tests to use with as well.

@pedrocarlo pedrocarlo requested a review from penberg as a code owner April 2, 2025 04:45
@pedrocarlo
Copy link
Contributor Author

Tests already detected some problems with btree

@PThorpe92
Copy link
Contributor

UPDATE also specifically overwrites the cell (usually), so it would be valuable to add some tests like:

sqlite3: create new update.db file with test table, 3 cols 1000 rows

limbo: open update.db, update 1 column in that table with values that are equal or smaller than the original value. Then update another column with a value that is larger.

sqlite3: open update.db and assert that all the columns have the expected counts/values

@pedrocarlo
Copy link
Contributor Author

UPDATE also specifically overwrites the cell (usually), so it would be valuable to add some tests like:

sqlite3: create new update.db file with test table, 3 cols 1000 rows

limbo: open update.db, update 1 column in that table with values that are equal or smaller than the original value. Then update another column with a value that is larger.

sqlite3: open update.db and assert that all the columns have the expected counts/values

Oh that is good to test. I will add this. I'm also adding the UV workspace stuff to facilitate dependency management for our Python code.

Copy link
Contributor

@PThorpe92 PThorpe92 left a comment

Choose a reason for hiding this comment

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

Great stuff here

@pedrocarlo pedrocarlo force-pushed the write-tests branch 3 times, most recently from c1574d8 to c2c34d3 Compare April 6, 2025 17:01
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.

2 participants