Overhaul in printing using rich

This commit is contained in:
pedrocarlo
2025-04-03 23:07:07 -03:00
parent b34e7e011e
commit d71029cda7
6 changed files with 58 additions and 23 deletions

View File

@@ -1,6 +1,7 @@
#!/usr/bin/env python3
import os
from cli_tests.test_limbo_cli import TestLimboShell
from cli_tests import console
sqlite_exec = "./scripts/limbo-sqlite3"
sqlite_flags = os.getenv("SQLITE_FLAGS", "-q").split(" ")
@@ -81,7 +82,7 @@ def test_regexp():
lambda res: "Parse error: no such function" in res,
)
limbo.run_test_fn(f".load {extension_path}", null)
print(f"Extension {extension_path} loaded successfully.")
console.info(f"Extension {extension_path} loaded successfully.")
limbo.run_test_fn("SELECT regexp('a.c', 'abc');", true)
limbo.run_test_fn("SELECT regexp('a.c', 'ac');", false)
limbo.run_test_fn("SELECT regexp('[0-9]+', 'the year is 2021');", true)
@@ -522,7 +523,7 @@ def test_vfs():
lambda res: res == "50",
"Tested large write to testfs",
)
print("Tested large write to testfs")
console.info("Tested large write to testfs")
limbo.quit()
@@ -601,11 +602,11 @@ def main():
test_kv()
test_drop_virtual_table()
except Exception as e:
print(f"Test FAILED: {e}")
console.error(f"Test FAILED: {e}")
cleanup()
exit(1)
cleanup()
print("All tests passed successfully.")
console.info("All tests passed successfully.")
if __name__ == "__main__":