summaryrefslogtreecommitdiff
path: root/src/click/testing.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/click/testing.py')
-rw-r--r--src/click/testing.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/click/testing.py b/src/click/testing.py
index c5d1450..a3dba3b 100644
--- a/src/click/testing.py
+++ b/src/click/testing.py
@@ -109,7 +109,7 @@ class Result(object):
def __repr__(self):
return "<{} {}>".format(
- type(self).__name__, self.exception and repr(self.exception) or "okay",
+ type(self).__name__, repr(self.exception) if self.exception else "okay"
)
@@ -210,12 +210,12 @@ class CliRunner(object):
def visible_input(prompt=None):
sys.stdout.write(prompt or "")
val = input.readline().rstrip("\r\n")
- sys.stdout.write(val + "\n")
+ sys.stdout.write("{}\n".format(val))
sys.stdout.flush()
return val
def hidden_input(prompt=None):
- sys.stdout.write((prompt or "") + "\n")
+ sys.stdout.write("{}\n".format(prompt or ""))
sys.stdout.flush()
return input.readline().rstrip("\r\n")