diff options
author | Anthony Sottile <asottile@umich.edu> | 2020-10-02 13:16:22 -0700 |
---|---|---|
committer | Anthony Sottile <asottile@umich.edu> | 2020-10-03 12:46:54 -0700 |
commit | 66bd44c13aa7fd1c94dd70aee40ce2d50ec20f2e (patch) | |
tree | f2471d5025f4e59e1e85aa5f9de2a44eb51b8b6d /src/_pytest/main.py | |
parent | b1bcb9fba8c641e4d932d6b09cddf254ff538e6b (diff) | |
download | pytest-66bd44c13aa7fd1c94dd70aee40ce2d50ec20f2e.tar.gz |
py36+: pyupgrade: py36+
Diffstat (limited to 'src/_pytest/main.py')
-rw-r--r-- | src/_pytest/main.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/_pytest/main.py b/src/_pytest/main.py index bb11df4ea..bb08bb15c 100644 --- a/src/_pytest/main.py +++ b/src/_pytest/main.py @@ -267,9 +267,7 @@ def wrap_session( if excinfo.value.returncode is not None: exitstatus = excinfo.value.returncode if initstate < 2: - sys.stderr.write( - "{}: {}\n".format(excinfo.typename, excinfo.value.msg) - ) + sys.stderr.write(f"{excinfo.typename}: {excinfo.value.msg}\n") config.hook.pytest_keyboard_interrupt(excinfo=excinfo) session.exitstatus = exitstatus except BaseException: @@ -615,8 +613,8 @@ class Session(nodes.FSCollector): if self._notfound: errors = [] for arg, cols in self._notfound: - line = "(no name {!r} in any of {!r})".format(arg, cols) - errors.append("not found: {}\n{}".format(arg, line)) + line = f"(no name {arg!r} in any of {cols!r})" + errors.append(f"not found: {arg}\n{line}") raise UsageError(*errors) if not genitems: items = rep.result |