Skip to content

Commit

Permalink
Fix tests for latest Click (7.1.1)
Browse files Browse the repository at this point in the history
  • Loading branch information
bbc2 committed Apr 12, 2020
1 parent eb3eab8 commit b491bbc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
bumpversion
typing; python_version<"3.5"
click==7.0
click
flake8>=2.2.3
ipython
mock
Expand Down
10 changes: 5 additions & 5 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b491bbc

Please sign in to comment.