old_contents: import sys
  import os
  if sys.version_info < (2, 7):
      from unittest2 import TestCase  # pragma: nocover
  else:
      from unittest import TestCase  # pragma: nocover
  
  
  class PecanTestCase(TestCase):
  
      def setUp(self):
          self.addCleanup(self._reset_global_config)
  
      def _reset_global_config(self):
          from pecan import configuration
          configuration.set_config(
              dict(configuration.initconf()),
              overwrite=True
          )
          os.environ.pop('PECAN_CONFIG', None)
  
new_contents: import sys
  import os
  if sys.version_info < (2, 7):
      from unittest2 import TestCase  # pragma: nocover
  else:
      from unittest import TestCase  # pragma: nocover
  from pecan.testing import reset_global_config
  
  
  class PecanTestCase(TestCase):
  
      def setUp(self):
          self.addCleanup(reset_global_config)
  
subject: use the new utility helper in Pecan's own unit tests