Skip to content

Commit

Permalink
Update formatting for updated black
Browse files Browse the repository at this point in the history
  • Loading branch information
mfogel committed Jul 6, 2024
1 parent 483cf97 commit 7a6e9d6
Showing 1 changed file with 23 additions and 11 deletions.
34 changes: 23 additions & 11 deletions tests/test_deconstruct.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,21 @@
]
)
def field(request, to_tzobj, use_pytz):
yield TimeZoneField(use_pytz=use_pytz) if request.param == "use_pytz_1" else TimeZoneField(
choices=[
(to_tzobj("US/Pacific"), "US/Pacific"),
(to_tzobj("US/Eastern"), "US/Eastern"),
],
use_pytz=use_pytz,
) if request.param == "use_pytz_2" else request.param
yield (
TimeZoneField(use_pytz=use_pytz)
if request.param == "use_pytz_1"
else (
TimeZoneField(
choices=[
(to_tzobj("US/Pacific"), "US/Pacific"),
(to_tzobj("US/Eastern"), "US/Eastern"),
],
use_pytz=use_pytz,
)
if request.param == "use_pytz_2"
else request.param
)
)


def test_deconstruct(field):
Expand Down Expand Up @@ -86,10 +94,14 @@ def test_specifying_defaults_not_frozen(use_pytz, base_tzstrs):
]
)
def choices(request, to_tzobj):
yield request.param if request.param is not None else [
(to_tzobj("US/Pacific"), "US/Pacific"),
(to_tzobj("US/Eastern"), "US/Eastern"),
]
yield (
request.param
if request.param is not None
else [
(to_tzobj("US/Pacific"), "US/Pacific"),
(to_tzobj("US/Eastern"), "US/Eastern"),
]
)


def test_deconstruct_when_using_choices(choices, use_pytz):
Expand Down

0 comments on commit 7a6e9d6

Please sign in to comment.