Skip to content

Commit 05ac018

Browse files
authored
formatting
Co-authored-by: Emily KL <4672118+emilykl@users.noreply.github.com>
1 parent 82e5759 commit 05ac018

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

tests/test_optional/test_autoshapes/test_annotated_shapes.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -444,12 +444,10 @@ def test_vline_datetime_string_annotation():
444444
assert fig.layout.annotations[0].x == "2018-09-24"
445445

446446

447-
def test_hline_with_datetime_vline():
447+
def test_hline_with_datetime_xaxis():
448448
"""numeric add_hline should still work with datetime x-axis."""
449449
fig = go.Figure()
450-
fig.add_trace(
451-
go.Scatter(x=["2018-01-01", "2018-06-01", "2018-12-31"], y=[1, 2, 3])
452-
)
450+
fig.add_trace(go.Scatter(x=["2018-01-01", "2018-06-01", "2018-12-31"], y=[1, 2, 3]))
453451
fig.add_hline(y=2, annotation_text="hline test")
454452
assert len(fig.layout.annotations) == 1
455453
assert fig.layout.annotations[0].text == "hline test"
@@ -459,9 +457,7 @@ def test_hline_with_datetime_vline():
459457
def test_vrect_datetime_string_annotation():
460458
"""add_vrect with annotation_text on datetime x-axis should not crash."""
461459
fig = go.Figure()
462-
fig.add_trace(
463-
go.Scatter(x=["2018-01-01", "2018-06-01", "2018-12-31"], y=[1, 2, 3])
464-
)
460+
fig.add_trace(go.Scatter(x=["2018-01-01", "2018-06-01", "2018-12-31"], y=[1, 2, 3]))
465461
fig.add_vrect(x0="2018-03-01", x1="2018-09-01", annotation_text="rect test")
466462
assert len(fig.layout.annotations) == 1
467463
assert fig.layout.annotations[0].text == "rect test"
@@ -508,4 +504,3 @@ def test_vrect_datetime_object_annotation():
508504
assert len(fig.layout.annotations) == 1
509505
assert fig.layout.annotations[0].text == "rect dt test"
510506
assert fig.layout.annotations[0].x == datetime.datetime(2018, 9, 1)
511-

0 commit comments

Comments
 (0)