We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5ca6521 commit 911c044Copy full SHA for 911c044
panel/tests/test_imports.py
@@ -19,3 +19,34 @@ def test_no_blocklist_imports():
19
output = check_output([sys.executable, '-c', dedent(check)])
20
21
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""
0 commit comments