introduce test theme

This commit is contained in:
pedrocarlo
2025-04-04 00:56:50 -03:00
parent 321def3c30
commit 3cd2017df4
2 changed files with 36 additions and 3 deletions

View File

@@ -132,7 +132,7 @@ INSERT INTO t VALUES (zeroblob(1024 - 1), zeroblob(1024 - 2), zeroblob(1024 - 3)
self.shell.quit()
def run_test(self, name: str, sql: str, expected: str) -> None:
console.info(f"Running test: {name}", _stack_offset=2)
console.test(f"Running test: {name}", _stack_offset=2)
actual = self.shell.execute(sql)
assert actual == expected, (
f"Test failed: {name}\n"
@@ -152,7 +152,7 @@ INSERT INTO t VALUES (zeroblob(1024 - 1), zeroblob(1024 - 2), zeroblob(1024 - 3)
# Print the test that is executing before executing the sql command
# Printing later confuses the user of the code what test has actually failed
if desc:
console.info(f"Testing: {desc}", _stack_offset=2)
console.test(f"Testing: {desc}", _stack_offset=2)
actual = self.shell.execute(sql)
assert validate(actual), f"Test failed\nSQL: {sql}\nActual:\n{repr(actual)}"