File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1183,15 +1183,6 @@ def _load_backward_compatible(self):
11831183 pass
11841184 return module
11851185
1186- # XXX If we don't end up using this for pythonrun.c/runpy, we should
1187- # get rid of it.
1188- def _load_existing (self , module ):
1189- """Exec the spec'ed module into an existing module's namespace."""
1190- # For use by runpy.
1191- with _installed_safely (module ):
1192- loaded = self .exec (module )
1193- return loaded
1194-
11951186 def _load_unlocked (self ):
11961187 # A helper for direct use by the import system.
11971188 if self .spec .loader is not None :
@@ -1389,7 +1380,6 @@ def _search_registry(cls, fullname):
13891380
13901381 @classmethod
13911382 def find_spec (cls , fullname , path = None , target = None ):
1392- # XXX untested! Need a Windows person to write tests (otherwise mock out appropriately)
13931383 filepath = cls ._search_registry (fullname )
13941384 if filepath is None :
13951385 return None
Original file line number Diff line number Diff line change @@ -437,18 +437,6 @@ def exec_module(self, module):
437437 loaded = self .bootstrap ._SpecMethods (self .spec ).load ()
438438 self .assertNotIn (self .spec .name , sys .modules )
439439
440- def test_load_existing (self ):
441- existing = type (sys )('ham' )
442- existing .count = 5
443- self .spec .loader = NewLoader ()
444- with CleanImport (self .name ):
445- sys .modules [self .name ] = existing
446- assert self .spec .name == self .name
447- loaded = self .bootstrap ._SpecMethods (self .spec ).load ()
448-
449- self .assertEqual (loaded .eggs , 1 )
450- self .assertFalse (hasattr (loaded , 'ham' ))
451-
452440 def test_load_legacy (self ):
453441 self .spec .loader = LegacyLoader ()
454442 with CleanImport (self .spec .name ):
You can’t perform that action at this time.
0 commit comments