def test_decorator_overrides_switch_setting(self): with_decorator = switches(foo=True, gutter=self.gutter)(self.without_decorator) eq_(self.without_decorator(), False) eq_(with_decorator(), True)
def test_context_manager_overrides_swich_setting(self): eq_(self.gutter.active('foo'), False) with switches(foo=True, gutter=self.gutter): eq_(self.gutter.active('foo'), True)
def test_context_manager_overrides_swich_setting(self): eq_(gutter.active('foo'), False) with switches(foo=True): eq_(gutter.active('foo'), True)
def test_context_manager_overrides_swich_setting(self): assert self.gutter.active('foo') is False with switches(foo=True, gutter=self.gutter): assert self.gutter.active('foo') is True
def test_decorator_overrides_switch_setting(self): with_decorator = switches(foo=True, gutter=self.gutter)(self.without_decorator) assert self.without_decorator() is False assert with_decorator() is True