mirror of
https://github.com/lancedb/lancedb.git
synced 2025-12-25 22:29:58 +00:00
This changes `lancedb` from a "pure python" setuptools project to a maturin project and adds a rust lancedb dependency. The async python client is extremely minimal (only `connect` and `Connection.table_names` are supported). The purpose of this PR is to get the infrastructure in place for building out the rest of the async client. Although this is not technically a breaking change (no APIs are changing) it is still a considerable change in the way the wheels are built because they now include the native shared library.
32 lines
923 B
Python
32 lines
923 B
Python
from click.testing import CliRunner
|
|
from lancedb.cli.cli import cli
|
|
from lancedb.utils import CONFIG
|
|
|
|
|
|
def test_entry():
|
|
runner = CliRunner()
|
|
result = runner.invoke(cli)
|
|
assert result.exit_code == 0 # Main check
|
|
assert "lancedb" in result.output.lower() # lazy check
|
|
|
|
|
|
def test_diagnostics():
|
|
runner = CliRunner()
|
|
result = runner.invoke(cli, ["diagnostics", "--disabled"])
|
|
assert result.exit_code == 0 # Main check
|
|
assert not CONFIG["diagnostics"]
|
|
|
|
result = runner.invoke(cli, ["diagnostics", "--enabled"])
|
|
assert result.exit_code == 0 # Main check
|
|
assert CONFIG["diagnostics"]
|
|
|
|
|
|
def test_config():
|
|
runner = CliRunner()
|
|
result = runner.invoke(cli, ["config"])
|
|
assert result.exit_code == 0 # Main check
|
|
cfg = CONFIG.copy()
|
|
cfg.pop("uuid")
|
|
for item in cfg: # check for keys only as formatting is subject to change
|
|
assert item in result.output
|