File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -19,3 +19,34 @@ def test_no_blocklist_imports():
1919 output = check_output ([sys .executable , '-c' , dedent (check )])
2020
2121 assert output == b""
22+
23+
24+ def test_limited_panel_imports ():
25+ check = """\
26+ import sys
27+ import panel
28+
29+ found = sorted([k for k in sys.modules if k.startswith("panel")])
30+
31+ expected = [
32+ "panel",
33+ "panel.__version",
34+ "panel._version",
35+ "panel.config",
36+ "panel.depends",
37+ "panel.io",
38+ "panel.io.logging",
39+ "panel.io.state",
40+ "panel.util",
41+ "panel.util.checks",
42+ "panel.util.parameters",
43+ ]
44+
45+ if found != expected:
46+ mods = set(found) - set(expected)
47+ print(", ".join(mods), end="")
48+ """
49+
50+ output = check_output ([sys .executable , '-c' , dedent (check )])
51+
52+ assert output == b""
You can’t perform that action at this time.
0 commit comments