@@ -539,7 +539,6 @@ class Session(FSCollector):
539539 def __init__ (self , config ):
540540 FSCollector .__init__ (self , config .rootdir , parent = None ,
541541 config = config , session = self )
542- self ._fs2hookproxy = {}
543542 self .testsfailed = 0
544543 self .testscollected = 0
545544 self .shouldstop = False
@@ -570,23 +569,18 @@ def isinitpath(self, path):
570569 return path in self ._initialpaths
571570
572571 def gethookproxy (self , fspath ):
573- try :
574- return self ._fs2hookproxy [fspath ]
575- except KeyError :
576- # check if we have the common case of running
577- # hooks with all conftest.py filesall conftest.py
578- pm = self .config .pluginmanager
579- my_conftestmodules = pm ._getconftestmodules (fspath )
580- remove_mods = pm ._conftest_plugins .difference (my_conftestmodules )
581- if remove_mods :
582- # one or more conftests are not in use at this fspath
583- proxy = FSHookProxy (fspath , pm , remove_mods )
584- else :
585- # all plugis are active for this fspath
586- proxy = self .config .hook
587-
588- self ._fs2hookproxy [fspath ] = proxy
589- return proxy
572+ # check if we have the common case of running
573+ # hooks with all conftest.py filesall conftest.py
574+ pm = self .config .pluginmanager
575+ my_conftestmodules = pm ._getconftestmodules (fspath )
576+ remove_mods = pm ._conftest_plugins .difference (my_conftestmodules )
577+ if remove_mods :
578+ # one or more conftests are not in use at this fspath
579+ proxy = FSHookProxy (fspath , pm , remove_mods )
580+ else :
581+ # all plugis are active for this fspath
582+ proxy = self .config .hook
583+ return proxy
590584
591585 def perform_collect (self , args = None , genitems = True ):
592586 hook = self .config .hook
0 commit comments