Skip to content

Commit 31c1856

Browse files
authored
F string fixes (#31751)
1 parent 808004a commit 31c1856

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pandas/tests/series/indexing/test_indexing.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ def test_basic_getitem_setitem_corner(datetime_series):
429429
@pytest.mark.parametrize("tz", ["US/Eastern", "UTC", "Asia/Tokyo"])
430430
def test_setitem_with_tz(tz):
431431
orig = pd.Series(pd.date_range("2016-01-01", freq="H", periods=3, tz=tz))
432-
assert orig.dtype == "datetime64[ns, {0}]".format(tz)
432+
assert orig.dtype == f"datetime64[ns, {tz}]"
433433

434434
# scalar
435435
s = orig.copy()
@@ -456,7 +456,7 @@ def test_setitem_with_tz(tz):
456456
[pd.Timestamp("2011-01-01", tz=tz), pd.Timestamp("2012-01-01", tz=tz)],
457457
index=[1, 2],
458458
)
459-
assert vals.dtype == "datetime64[ns, {0}]".format(tz)
459+
assert vals.dtype == f"datetime64[ns, {tz}]"
460460

461461
s[[1, 2]] = vals
462462
exp = pd.Series(
@@ -481,7 +481,7 @@ def test_setitem_with_tz_dst():
481481
# GH XXX
482482
tz = "US/Eastern"
483483
orig = pd.Series(pd.date_range("2016-11-06", freq="H", periods=3, tz=tz))
484-
assert orig.dtype == "datetime64[ns, {0}]".format(tz)
484+
assert orig.dtype == f"datetime64[ns, {tz}]"
485485

486486
# scalar
487487
s = orig.copy()
@@ -508,7 +508,7 @@ def test_setitem_with_tz_dst():
508508
[pd.Timestamp("2011-01-01", tz=tz), pd.Timestamp("2012-01-01", tz=tz)],
509509
index=[1, 2],
510510
)
511-
assert vals.dtype == "datetime64[ns, {0}]".format(tz)
511+
assert vals.dtype == f"datetime64[ns, {tz}]"
512512

513513
s[[1, 2]] = vals
514514
exp = pd.Series(

0 commit comments

Comments
 (0)