Files
turso/testing/README.md
Piotr Rzysko 20ea079679 Add framework for testing extensions in TCL
There is a distinction between tests that verify extension-specific
behavior and tests that verify interactions between the database engine
and extensions. Previously, both types of tests were kept in extensions.py.
With this new framework, we can extract the latter type of tests from
extensions.py into TCL. This cleans up extensions.py and provides
compatibility testing with SQLite at no extra cost.

To demonstrate the framework’s usage, tests verifying the handling of
virtual tables were extracted to TCL.

In the future, we may consider moving extension-specific tests to TCL as
well, especially those that have counterparts in SQLite or sqlean.
2025-08-15 21:06:27 +02:00

10 lines
519 B
Markdown

# Turso Testing
## Testing Extensions
When adding tests for extensions, please follow these guidelines:
* Tests that verify the internal logic or behavior of a particular extension should go into `cli_tests/extensions.py`.
* Tests that verify how extensions interact with the database engine, such as virtual table handling, should be written
in TCL (see `vtab.test` as an example).
To check which extensions are available in TCL, or to add a new one, refer to the `tester.tcl` file and look at the `extension_map`.