From b491bbcd00caedf5b8cf5449b991704cab6a5306 Mon Sep 17 00:00:00 2001 From: Bertrand Bonnefoy-Claudet Date: Sun, 12 Apr 2020 16:42:02 +0200 Subject: [PATCH] Fix tests for latest Click (7.1.1) --- requirements.txt | 2 +- tests/test_cli.py | 10 +++++----- tox.ini | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/requirements.txt b/requirements.txt index a2d892a4..e5e4de12 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ bumpversion typing; python_version<"3.5" -click==7.0 +click flake8>=2.2.3 ipython mock diff --git a/tests/test_cli.py b/tests/test_cli.py index 18e53323..edc62fff 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -20,7 +20,7 @@ def test_list_non_existent_file(cli): result = cli.invoke(dotenv_cli, ['--file', 'nx_file', 'list']) assert result.exit_code == 2, result.output - assert 'Invalid value for "-f"' in result.output + assert "Invalid value for '-f'" in result.output def test_list_no_file(cli): @@ -48,7 +48,7 @@ def test_get_no_file(cli): result = cli.invoke(dotenv_cli, ['--file', 'nx_file', 'get', 'a']) assert result.exit_code == 2 - assert 'Invalid value for "-f"' in result.output + assert "Invalid value for '-f'" in result.output def test_unset_existing_value(cli, dotenv_file): @@ -97,7 +97,7 @@ def test_set_no_file(cli): result = cli.invoke(dotenv_cli, ["--file", "nx_file", "set"]) assert result.exit_code == 2 - assert 'Invalid value for "-f"' in result.output + assert "Invalid value for '-f'" in result.output def test_get_default_path(tmp_path): @@ -145,14 +145,14 @@ def test_run_without_cmd(cli): result = cli.invoke(dotenv_cli, ['run']) assert result.exit_code == 2 - assert 'Invalid value for "-f"' in result.output + assert "Invalid value for '-f'" in result.output def test_run_with_invalid_cmd(cli): result = cli.invoke(dotenv_cli, ['run', 'i_do_not_exist']) assert result.exit_code == 2 - assert 'Invalid value for "-f"' in result.output + assert "Invalid value for '-f'" in result.output def test_run_with_version(cli): diff --git a/tox.ini b/tox.ini index a5dc050b..2dd61864 100644 --- a/tox.ini +++ b/tox.ini @@ -7,7 +7,7 @@ deps = pytest coverage sh - click==7.0 + click py{27,py}: ipython<6.0.0 py34{,-no-typing}: ipython<7.0.0 py{35,36,37,38,py3}: ipython