Normalize whitespace in test arguments

We have a bunch of different styles of handling when function
definitions span multiple lines, which they almost always do with tests.

Here’s why an argument per line, single indent is best:
- cleaner diffs when you change the name of a method (one line change
  instead of multiple lines)
- works better on narrow screens, eg Github’s diff view, or with two
  terminals side by side on a laptop screen
- works with any editor’s indenting shortcuts, no need for an IDE

Also, trailing comma in the list of arguments is good because adding a
new argument to a method becomes a one line, not two line diff.
This commit is contained in:
Chris Hill-Scott
2017-02-06 10:44:37 +00:00
parent b9d88cccc3
commit 929dc45224
28 changed files with 1547 additions and 1103 deletions
+7 -5
View File
@@ -2,11 +2,13 @@ import pytest
from flask import url_for
def test_logged_in_user_redirects_to_choose_service(app_,
api_user_active,
mock_get_user,
mock_get_user_by_email,
mock_login):
def test_logged_in_user_redirects_to_choose_service(
app_,
api_user_active,
mock_get_user,
mock_get_user_by_email,
mock_login,
):
with app_.test_request_context():
with app_.test_client() as client:
client.login(api_user_active)