File tree Expand file tree Collapse file tree 4 files changed +0
-130
lines changed
Expand file tree Collapse file tree 4 files changed +0
-130
lines changed Original file line number Diff line number Diff line change 3939 "Top" ,
4040 "U" ,
4141 "Diagram" ,
42- "kill" ,
4342 "MatCell" ,
4443 "MatStruct" ,
4544 # Codec API
9493 # Diagram imports networkx and matplotlib
9594 "Diagram" : (".diagram" , "Diagram" ),
9695 "diagram" : (".diagram" , None ), # Return the module itself
97- # kill imports pymysql via connection
98- "kill" : (".admin" , "kill" ),
9996 # cli imports click
10097 "cli" : (".cli" , "cli" ),
10198}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 5050)
5151
5252
53- class _RenameMap (tuple ):
54- """for internal use"""
55-
56- pass
57-
58-
5953@dataclass
6054class ValidationResult :
6155 """
Original file line number Diff line number Diff line change @@ -27,25 +27,6 @@ def test_lazy_diagram_import():
2727 assert Diagram .__name__ == "Diagram"
2828
2929
30- def test_lazy_admin_import ():
31- """Admin module should not be loaded until dj.kill is accessed."""
32- # Remove datajoint from sys.modules to get fresh import
33- modules_to_remove = [key for key in sys .modules if key .startswith ("datajoint" )]
34- for mod in modules_to_remove :
35- del sys .modules [mod ]
36-
37- # Import datajoint
38- import datajoint as dj
39-
40- # Admin module should not be loaded yet
41- assert "datajoint.admin" not in sys .modules , "admin module loaded eagerly"
42-
43- # Access kill - should trigger lazy load
44- kill = dj .kill
45- assert "datajoint.admin" in sys .modules , "admin module not loaded after access"
46- assert callable (kill )
47-
48-
4930def test_lazy_cli_import ():
5031 """CLI module should not be loaded until dj.cli is accessed."""
5132 # Remove datajoint from sys.modules to get fresh import
@@ -103,5 +84,4 @@ def test_core_imports_available():
10384
10485 # Heavy modules should still not be loaded
10586 assert "datajoint.diagram" not in sys .modules
106- assert "datajoint.admin" not in sys .modules
10787 assert "datajoint.cli" not in sys .modules
You can’t perform that action at this time.
0 commit comments