File tree Expand file tree Collapse file tree 3 files changed +53
-2
lines changed
dash-core-components/dash_core_components_base
dash-table/dash_table_base Expand file tree Collapse file tree 3 files changed +53
-2
lines changed Original file line number Diff line number Diff line change 4
4
import dash as _dash
5
5
6
6
from ._imports_ import * # noqa: F401, F403, E402
7
- from ._imports_ import __all__ # noqa: E402
7
+ from ._imports_ import __all__ as _components
8
8
from .express import ( # noqa: F401, E402
9
9
send_bytes ,
10
10
send_data_frame ,
11
11
send_file ,
12
12
send_string ,
13
13
)
14
14
15
+ __all__ = _components + [
16
+ "send_bytes" ,
17
+ "send_data_frame" ,
18
+ "send_file" ,
19
+ "send_string" ,
20
+ ]
21
+
15
22
_basepath = _os .path .dirname (__file__ )
16
23
_filepath = _os .path .abspath (_os .path .join (_basepath , "package-info.json" ))
17
24
with open (_filepath ) as f :
Original file line number Diff line number Diff line change 14
14
_sys .exit (1 )
15
15
16
16
from ._imports_ import * # noqa: E402, F401, F403
17
- from ._imports_ import __all__ # noqa: E402
17
+ from ._imports_ import __all__ as _components
18
18
from . import Format # noqa: F401, E402
19
19
from . import FormatTemplate # noqa: F401, E402
20
20
21
+ __all__ = _components + ["Format" , "FormatTemplate" ]
22
+
21
23
_basepath = _os .path .dirname (__file__ )
22
24
_filepath = _os .path .abspath (_os .path .join (_basepath , "package-info.json" ))
23
25
with open (_filepath ) as f :
Original file line number Diff line number Diff line change
1
+ from pytest import warns
2
+
3
+ from dash import dcc , dash_table
4
+
5
+
6
+ def filter_dir (package ):
7
+ ignore = [
8
+ "warnings" ,
9
+ "json" ,
10
+ "async_resources" ,
11
+ "package" ,
12
+ "package_name" ,
13
+ "f" ,
14
+ "express" ,
15
+ ]
16
+ return sorted (
17
+ [
18
+ item
19
+ for item in dir (package )
20
+ if item == "__version__" or (item [0 ] not in "@_" and item not in ignore )
21
+ ]
22
+ )
23
+
24
+
25
+ def test_old_dcc ():
26
+ with warns (UserWarning , match = "dash_core_components package is deprecated" ):
27
+ import dash_core_components as _dcc
28
+
29
+ old_dir = filter_dir (_dcc )
30
+ new_dir = filter_dir (dcc )
31
+
32
+ assert old_dir == new_dir
33
+
34
+
35
+ def test_old_table ():
36
+ with warns (UserWarning , match = "dash_table package is deprecated" ):
37
+ import dash_table as _dt
38
+
39
+ old_dir = filter_dir (_dt )
40
+ new_dir = filter_dir (dash_table )
41
+
42
+ assert old_dir == new_dir
You can’t perform that action at this time.
0 commit comments