Skip to content

Commit c5481a2

Browse files
committed
🙈 hit show_dash with updated xaxis range
1 parent 7e5c668 commit c5481a2

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

tests/conftest.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,5 +493,4 @@ def multi_trace_go_figure() -> FigureResampler:
493493
hf_y=y + i,
494494
)
495495
fig.update_layout(height=800)
496-
fig.update_xaxes(range=[100, 200_000])
497496
return fig

tests/test_figure_resampler_selenium.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -657,3 +657,31 @@ def test_multi_trace_go_figure(driver, multi_trace_go_figure):
657657
raise e
658658
finally:
659659
proc.terminate()
660+
661+
662+
def test_multi_trace_go_figure_updated_xrange(driver, multi_trace_go_figure):
663+
# This test checks that the xaxis range is updated when the xaxis range is set
664+
# Notet hat this test just hits the .show_dash() method
665+
from pytest_cov.embed import cleanup_on_sigterm
666+
667+
cleanup_on_sigterm()
668+
669+
multi_trace_go_figure.update_xaxes(range=[100, 200_000])
670+
671+
port = 9038
672+
proc = multiprocessing.Process(
673+
target=multi_trace_go_figure.show_dash,
674+
kwargs=dict(mode="external", port=port),
675+
)
676+
proc.start()
677+
try:
678+
# Just hit the code of the .show_dash method when an x-range is set
679+
time.sleep(1)
680+
fr = FigureResamplerGUITests(driver, port=port)
681+
time.sleep(1)
682+
fr.go_to_page()
683+
684+
except Exception as e:
685+
raise e
686+
finally:
687+
proc.terminate()

0 commit comments

Comments
 (0)