Source

pypy / _pytest / config.py

Diff from to

_pytest/config.py

         config.trace.root.setwriter(sys.stderr.write)
     return config
 
+def pytest_unconfigure(config):
+    for func in config._cleanup:
+        func()
+
 class Parser:
     """ Parser for command line arguments. """
 
         self._conftest = Conftest(onimport=self._onimportconftest)
         self.hook = self.pluginmanager.hook
         self._inicache = {}
-
+        self._cleanup = []
+    
     @classmethod
     def fromdictargs(cls, option_dict, args):
         """ constructor useable for subprocesses. """