def test_parent(self): with context.Context("test") as ctx: with context.Context("test.foo"): test_ctx = context.find_context("..") assert_equal(test_ctx, ctx)
def test_by_name(self): with context.Context("test.foo") as ctx: test_ctx = context.find_context("test.foo") assert_equal(test_ctx, ctx)
def test_top(self): with context.Context("test") as ctx: with context.Context("test.foo"): test_ctx = context.find_context("^") assert_equal(test_ctx, ctx)
def test_parent(self): with context.Context('test') as ctx: with context.Context('test.foo'): test_ctx = context.find_context('..') assert_equal(test_ctx, ctx)
def test_by_name(self): with context.Context('test.foo') as ctx: test_ctx = context.find_context('test.foo') assert_equal(test_ctx, ctx)
def test_top(self): with context.Context('test') as ctx: with context.Context('test.foo'): test_ctx = context.find_context('^') assert_equal(test_ctx, ctx)