示例#1
0
 def hammett_add_fixture_result(self, result):
     from hammett.impl import fixture_scope
     if fixture_scope.get(self.current_fixture_setup,
                          'function') != self.scope:
         self.parent.hammett_add_fixture_result(result)
     else:
         self.fixture_results[self.current_fixture_setup] = result
示例#2
0
文件: __init__.py 项目: boxed/hammett
 def addfinalizer(self, x):
     assert Request.current_fixture_setup is not None
     from hammett.impl import fixture_scope
     if fixture_scope.get(Request.current_fixture_setup, 'function') != self.scope:
         self.parent.addfinalizer(x)
     else:
         self.finalizers.append(x)