From c9a85b0e78e744e2101473d313f7b50e2ecc408f Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Wed, 10 Oct 2018 19:53:21 -0300 Subject: [PATCH] Fix linting --- changelog/4093.trivial.rst | 2 +- doc/en/example/assertion/failure_demo.py | 6 +++--- src/_pytest/terminal.py | 4 +--- testing/test_pdb.py | 4 +--- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/changelog/4093.trivial.rst b/changelog/4093.trivial.rst index 7efc66c68..cbfbeb00d 100644 --- a/changelog/4093.trivial.rst +++ b/changelog/4093.trivial.rst @@ -1 +1 @@ -The incorrect string literals are fixed. \ No newline at end of file +Fixed formatting of string literals in internal tests. diff --git a/doc/en/example/assertion/failure_demo.py b/doc/en/example/assertion/failure_demo.py index 5dff265a5..ae2f5acb2 100644 --- a/doc/en/example/assertion/failure_demo.py +++ b/doc/en/example/assertion/failure_demo.py @@ -245,9 +245,9 @@ class TestCustomAssertMsg(object): a = 1 b = 2 - assert A.a == b, ( - "A.a appears not to be b\nor does not appear to be b\none of those" - ) + assert ( + A.a == b + ), "A.a appears not to be b\nor does not appear to be b\none of those" def test_custom_repr(self): class JSON(object): diff --git a/src/_pytest/terminal.py b/src/_pytest/terminal.py index a7a45da57..f4dbbe61a 100644 --- a/src/_pytest/terminal.py +++ b/src/_pytest/terminal.py @@ -835,9 +835,7 @@ def repr_pythonversion(v=None): def build_summary_stats_line(stats): - keys = ( - "failed passed skipped deselected xfailed xpassed warnings error" - ).split() + keys = ("failed passed skipped deselected xfailed xpassed warnings error").split() unknown_key_seen = False for key in stats.keys(): if key not in keys: diff --git a/testing/test_pdb.py b/testing/test_pdb.py index 1c99c9f1e..2c73963fa 100644 --- a/testing/test_pdb.py +++ b/testing/test_pdb.py @@ -281,9 +281,7 @@ class TestPDB(object): assert False """ ) - child = testdir.spawn_pytest( - "--show-capture=all --pdb -p no:logging %s" % p1 - ) + child = testdir.spawn_pytest("--show-capture=all --pdb -p no:logging %s" % p1) child.expect("get rekt") output = child.before.decode("utf8") assert "captured log" not in output