Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Commit 8f9a792

Browse files
authored
Merge pull request #907 from plotly/dash-1506
use dash loosen-testing-reqs branch and fix linting
2 parents a769c5c + 5d045ac commit 8f9a792

File tree

5 files changed

+18
-19
lines changed

5 files changed

+18
-19
lines changed

dash_core_components_base/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"named \n'dash.py' in your current directory.", file=_sys.stderr)
2020
_sys.exit(1)
2121

22-
from ._imports_ import * # noqa: F401, F403
22+
from ._imports_ import * # noqa: F401, F403, E402
2323
from ._imports_ import __all__ # noqa: E402
2424

2525
_current_path = _os.path.dirname(_os.path.abspath(__file__))

dev-requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
pandas
2-
xlrd
2+
xlrd<2
33
mimesis;python_version>="3.6"
4-
virtualenv;python_version=="2.7"
4+
virtualenv;python_version=="2.7"

tests/integration/location/test_location_callback.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ def update_pathname(n_clicks, current_pathname):
8787

8888
dash_dcc.start_server(app)
8989

90+
dash_dcc.wait_for_text_to_equal("#test-pathname", "/")
9091
dash_dcc.percy_snapshot("link -- location")
9192

9293
# Check that link updates pathname

tests/integration/store/test_store_data.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ def on_ts(ts, data):
120120

121121

122122
@pytest.mark.skipif(
123-
sys.version_info < (3, 6), reason="tests requires dependency only available in 3.6+",
123+
sys.version_info < (3, 6),
124+
reason="tests requires dependency only available in 3.6+",
124125
)
125126
@pytest.mark.parametrize("storage_type", ("memory", "local", "session"))
126127
def test_stda003_large_data_size(storage_type, csv_5mb, dash_dcc):

tests/integration/upload/test_upload_different_file_types.py

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import io
22
import base64
33
import os
4-
import time
54
import pytest
65
import pandas as pd
76

@@ -24,29 +23,26 @@ def load_table(filetype, payload):
2423
)
2524

2625
return html.Div(
27-
[
28-
DataTable(
29-
data=df.to_dict("records"),
30-
columns=[{"id": i} for i in ["city", "country"]],
31-
),
32-
html.Hr(),
33-
html.Div("Raw Content"),
34-
html.Pre(payload, style=pre_style),
35-
]
26+
DataTable(
27+
data=df.to_dict("records"),
28+
columns=[{"id": i} for i in ["city", "country"]],
29+
)
3630
)
3731

3832

3933
def load_data_by_type(filetype, contents):
4034
children = []
4135
_type, payload = contents.split(",")
4236
if filetype in {"csv", "xlsx", "xls"}:
43-
return load_table(filetype, payload)
37+
children = [load_table(filetype, payload)]
4438
elif filetype in {"png", "svg"}:
4539
children = [html.Img(src=contents)]
4640

47-
children.extend(
48-
(html.Hr(), html.Div("Raw Content"), html.Pre(payload, style=pre_style))
49-
)
41+
children += [
42+
html.Hr(),
43+
html.Div("Raw Content", id="raw-title"),
44+
html.Pre(payload, style=pre_style),
45+
]
5046
return html.Div(children)
5147

5248

@@ -92,5 +88,6 @@ def update_output(contents):
9288

9389
upload_div = dash_dcc.wait_for_element("#upload-div input[type=file]")
9490
upload_div.send_keys(filepath)
95-
time.sleep(0.5)
91+
92+
dash_dcc.wait_for_text_to_equal("#raw-title", "Raw Content")
9693
dash_dcc.percy_snapshot(filepath)

0 commit comments

Comments
 (0)