adjusting memory test to use UV

This commit is contained in:
pedrocarlo
2025-04-09 12:15:25 -03:00
parent 3cd2017df4
commit bd5531987e
3 changed files with 9 additions and 9 deletions

View File

@@ -98,8 +98,8 @@ test-json:
SQLITE_EXEC=$(SQLITE_EXEC) ./testing/json.test
.PHONY: test-json
test-memory:
SQLITE_EXEC=$(SQLITE_EXEC) ./testing/cli_tests/memory.py
test-memory: limbo uv-sync
SQLITE_EXEC=$(SQLITE_EXEC) uv run --project limbo_test test-memory
.PHONY: test-memory
test-write: limbo uv-sync

View File

@@ -1,6 +1,7 @@
#!/usr/bin/env python3
import os
from test_limbo_cli import TestLimboShell
from cli_tests.test_limbo_cli import TestLimboShell
from cli_tests import console
sqlite_flags = os.getenv("SQLITE_FLAGS", "-q").split(" ")
@@ -96,15 +97,13 @@ def main():
tests = memory_tests()
# TODO see how to parallelize this loop with different subprocesses
for test in tests:
limbo = TestLimboShell()
try:
stub_memory_test(limbo, **test)
with TestLimboShell("") as limbo:
stub_memory_test(limbo, **test)
except Exception as e:
print(f"Test FAILED: {e}")
limbo.quit()
console.error(f"Test FAILED: {e}")
exit(1)
limbo.quit() # remove this line when `with` statement is supported for TestLimboShell
print("All tests passed successfully.")
console.info("All tests passed successfully.")
if __name__ == "__main__":

View File

@@ -14,6 +14,7 @@ test-write = "cli_tests.write:main"
test-shell = "cli_tests.cli_test_cases:main"
test-extensions = "cli_tests.extensions:main"
test-update = "cli_tests.update:main"
test-memory = "cli_tests.memory:main"
[tool.uv]
package = true