|
17 | 17 | from plotly.subplots import make_subplots |
18 | 18 | from plotly_resampler import FigureResampler, LTTB, EveryNthPoint |
19 | 19 |
|
| 20 | +# Note: this will be used to skip / alter behavior when running browser tests on |
| 21 | +# non-linux platforms. |
| 22 | +from .utils import not_on_linux |
| 23 | + |
20 | 24 |
|
21 | 25 | def test_add_trace_kwarg_space(float_series, bool_series, cat_series): |
22 | 26 | # see: https://plotly.com/python/subplots/#custom-sized-subplot-with-subplot-titles |
@@ -1087,13 +1091,17 @@ def check_data(fr: FigureResampler, min_v=0, max_v=nb_datapoints-1): |
1087 | 1091 | # Even after updating the axes ranges |
1088 | 1092 | check_data(f_pr) |
1089 | 1093 |
|
| 1094 | + if not_on_linux(): |
| 1095 | + # TODO: eventually we should run this test on Windows & MacOS too |
| 1096 | + return |
| 1097 | + |
1090 | 1098 | f_pr.stop_server() |
1091 | 1099 | proc = multiprocessing.Process(target=f_pr.show_dash, kwargs=dict(mode="external")) |
1092 | 1100 | proc.start() |
1093 | 1101 | try: |
1094 | | - time.sleep(2) |
| 1102 | + time.sleep(1) |
1095 | 1103 | driver.get(f"http://localhost:8050") |
1096 | | - time.sleep(7) |
| 1104 | + time.sleep(3) |
1097 | 1105 | # Get the data property from the front-end figure |
1098 | 1106 | el = driver.find_element(by=By.ID, value="resample-figure") |
1099 | 1107 | el = el.find_element(by=By.CLASS_NAME, value="js-plotly-plot") |
@@ -1171,13 +1179,17 @@ def check_data(fr: FigureResampler, min_v=0, max_v=nb_datapoints-1): |
1171 | 1179 | # Even after updating the axes ranges |
1172 | 1180 | check_data(f_pr) |
1173 | 1181 |
|
| 1182 | + if not_on_linux(): |
| 1183 | + # TODO: eventually we should run this test on Windows & MacOS too |
| 1184 | + return |
| 1185 | + |
1174 | 1186 | f_pr.stop_server() |
1175 | 1187 | proc = multiprocessing.Process(target=f_pr.show_dash, kwargs=dict(mode="external")) |
1176 | 1188 | proc.start() |
1177 | 1189 | try: |
1178 | | - time.sleep(2) |
| 1190 | + time.sleep(1) |
1179 | 1191 | driver.get(f"http://localhost:8050") |
1180 | | - time.sleep(7) |
| 1192 | + time.sleep(3) |
1181 | 1193 | # Get the data & layout property from the front-end figure |
1182 | 1194 | el = driver.find_element(by=By.ID, value="resample-figure") |
1183 | 1195 | el = el.find_element(by=By.CLASS_NAME, value="js-plotly-plot") |
|
0 commit comments