mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
datasette install --upgrade option, closes #945
This commit is contained in:
parent
b21ed237ab
commit
69033c6ec4
3 changed files with 27 additions and 3 deletions
|
|
@ -125,6 +125,15 @@ def test_install(run_module):
|
|||
]
|
||||
|
||||
|
||||
@pytest.mark.parametrize("flag", ["-U", "--upgrade"])
|
||||
@mock.patch("datasette.cli.run_module")
|
||||
def test_install_upgrade(run_module, flag):
|
||||
runner = CliRunner()
|
||||
runner.invoke(cli, ["install", flag, "datasette"])
|
||||
run_module.assert_called_once_with("pip", run_name="__main__")
|
||||
assert sys.argv == ["pip", "install", "--upgrade", "datasette"]
|
||||
|
||||
|
||||
@mock.patch("datasette.cli.run_module")
|
||||
def test_uninstall(run_module):
|
||||
runner = CliRunner()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue