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
+21 -21
View File
@@ -63,9 +63,9 @@ stub_provider = {
def test_should_show_all_providers(
app_,
platform_admin_user,
mocker
app_,
platform_admin_user,
mocker,
):
mock_providers = mocker.patch(
'app.provider_client.get_all_providers',
@@ -130,9 +130,9 @@ def test_should_show_all_providers(
def test_should_show_provider_detail(
app_,
platform_admin_user,
mocker
app_,
platform_admin_user,
mocker,
):
mock_providers = mocker.patch(
'app.provider_client.get_provider_by_id',
@@ -158,9 +158,9 @@ def test_should_show_provider_detail(
def test_should_show_error_on_bad_provider_priority(
app_,
platform_admin_user,
mocker
app_,
platform_admin_user,
mocker,
):
mock_providers = mocker.patch(
'app.provider_client.get_provider_by_id',
@@ -180,9 +180,9 @@ def test_should_show_error_on_bad_provider_priority(
def test_should_show_error_on_negative_provider_priority(
app_,
platform_admin_user,
mocker
app_,
platform_admin_user,
mocker,
):
mock_providers = mocker.patch(
'app.provider_client.get_provider_by_id',
@@ -202,9 +202,9 @@ def test_should_show_error_on_negative_provider_priority(
def test_should_show_error_on_too_big_provider_priority(
app_,
platform_admin_user,
mocker
app_,
platform_admin_user,
mocker,
):
mock_providers = mocker.patch(
'app.provider_client.get_provider_by_id',
@@ -224,9 +224,9 @@ def test_should_show_error_on_too_big_provider_priority(
def test_should_show_error_on_too_little_provider_priority(
app_,
platform_admin_user,
mocker
app_,
platform_admin_user,
mocker,
):
mock_providers = mocker.patch(
'app.provider_client.get_provider_by_id',
@@ -246,9 +246,9 @@ def test_should_show_error_on_too_little_provider_priority(
def test_should_update_provider_priority(
app_,
platform_admin_user,
mocker
app_,
platform_admin_user,
mocker,
):
mock_providers = mocker.patch(