def test_pop_context_top(self): with self.assertRaises(Exception): ctx.pop_context()
def test_pop_context(self): ctx.push_context({'hello': 'world'}) ctx.pop_context() assert ctx.current_context().get('hello', None) is None