mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-30 22:14:22 +02:00
Merge 10a6e82f9a into a947dc6739
This commit is contained in:
commit
10e128e520
2 changed files with 24 additions and 5 deletions
|
|
@ -179,6 +179,25 @@ def test_convert_dryrun(test_db_and_path):
|
|||
assert result.output.strip().split("\n")[-1] == "Would affect 1 row"
|
||||
|
||||
|
||||
def test_convert_dryrun_identifier_with_closing_bracket(tmpdir):
|
||||
db_path = str(pathlib.Path(tmpdir) / "data.db")
|
||||
db = sqlite_utils.Database(db_path)
|
||||
db["example]table"].insert({"value]x": "alpha"})
|
||||
result = CliRunner().invoke(
|
||||
cli.cli,
|
||||
[
|
||||
"convert",
|
||||
db_path,
|
||||
"example]table",
|
||||
"value]x",
|
||||
"value.upper()",
|
||||
"--dry-run",
|
||||
],
|
||||
)
|
||||
assert result.exit_code == 0, result.output
|
||||
assert result.output.strip() == "alpha\n --- becomes:\nALPHA\n\nWould affect 1 row"
|
||||
|
||||
|
||||
def test_convert_multi_dryrun(test_db_and_path):
|
||||
db_path = test_db_and_path[1]
|
||||
result = CliRunner().invoke(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue