mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-11 19:24:21 +01:00
adjusting memory test to use UV
This commit is contained in:
4
Makefile
4
Makefile
@@ -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
|
||||
|
||||
@@ -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__":
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user