mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-25 10:24:32 +02:00
Use REAL for floating point columns if table is strict, closes #644
Refs #645
This commit is contained in:
parent
7423296ec7
commit
4dc2e2e9c8
4 changed files with 17 additions and 3 deletions
|
|
@ -2416,11 +2416,13 @@ def test_create_table_strict(strict):
|
|||
db = Database("test.db")
|
||||
result = runner.invoke(
|
||||
cli.cli,
|
||||
["create-table", "test.db", "items", "id", "integer"]
|
||||
["create-table", "test.db", "items", "id", "integer", "w", "float"]
|
||||
+ (["--strict"] if strict else []),
|
||||
)
|
||||
assert result.exit_code == 0
|
||||
assert db["items"].strict == strict or not db.supports_strict
|
||||
# Should have a floating point column
|
||||
assert db["items"].columns_dict == {"id": int, "w": float}
|
||||
|
||||
|
||||
@pytest.mark.parametrize("method", ("insert", "upsert"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue