示例#1
0
文件: testing.py 项目: hirokiky/foomn
 def __enter__(self):
     from foomn import get_settings, set_settings
     self.tmp_settings = get_settings()
     settings = get_settings()
     settings.update(self.override_settings)
     set_settings(settings)
     return self
示例#2
0
文件: testing.py 项目: hirokiky/foomn
 def __exit__(self, *args):
     from foomn import set_settings
     set_settings(self.tmp_settings)