summaryrefslogtreecommitdiff
path: root/tests/test_arguments.py
diff options
context:
space:
mode:
authorDavid Lord <davidism@gmail.com>2020-04-19 22:22:49 -0700
committerDavid Lord <davidism@gmail.com>2020-04-19 23:58:30 -0700
commitd8bd5b1e6ececb9f8ee7cc05a94216b86ce80aed (patch)
treec93a2687fb7fa85449b318e389b899df4918d27b /tests/test_arguments.py
parent56921211a3bdaefcc664994139979d25281167cf (diff)
downloadclick-d8bd5b1e6ececb9f8ee7cc05a94216b86ce80aed.tar.gz
apply pyupgrade --py36-plus
Diffstat (limited to 'tests/test_arguments.py')
-rw-r--r--tests/test_arguments.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/test_arguments.py b/tests/test_arguments.py
index bb580fc..4970486 100644
--- a/tests/test_arguments.py
+++ b/tests/test_arguments.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
import sys
import pytest
@@ -12,7 +11,7 @@ def test_nargs_star(runner):
@click.argument("dst")
def copy(src, dst):
click.echo("src={}".format("|".join(src)))
- click.echo("dst={}".format(dst))
+ click.echo(f"dst={dst}")
result = runner.invoke(copy, ["foo.txt", "bar.txt", "dir"])
assert not result.exception
@@ -33,7 +32,7 @@ def test_nargs_tup(runner):
@click.argument("name", nargs=1)
@click.argument("point", nargs=2, type=click.INT)
def copy(name, point):
- click.echo("name={}".format(name))
+ click.echo(f"name={name}")
click.echo("point={0[0]}/{0[1]}".format(point))
result = runner.invoke(copy, ["peter", "1", "2"])
@@ -91,7 +90,7 @@ def test_bytes_args(runner, monkeypatch):
runner.invoke(
from_bytes,
- [u"Something outside of ASCII range: 林".encode("UTF-8")],
+ ["Something outside of ASCII range: 林".encode()],
catch_exceptions=False,
)
@@ -208,7 +207,7 @@ def test_missing_arg(runner):
@click.command()
@click.argument("arg")
def cmd(arg):
- click.echo("arg:{}".format(arg))
+ click.echo(f"arg:{arg}")
result = runner.invoke(cmd, [])
assert result.exit_code == 2