def test_not_found(self): test_ctx = context.find_closest_context("test") assert_equal(test_ctx, None)
def test_skip_up(self): with context.Context("test", 5) as ctx: with context.Context(".bar"): test_ctx = context.find_closest_context("test") assert_equal(ctx, test_ctx)
def test_simple(self): with context.Context("test.bar", 5) as ctx: test_ctx = context.find_closest_context("test.bar") assert_equal(ctx, test_ctx)
def test_not_found(self): test_ctx = context.find_closest_context('test') assert_equal(test_ctx, None)
def test_skip_up(self): with context.Context('test', 5) as ctx: with context.Context('.bar'): test_ctx = context.find_closest_context('test') assert_equal(ctx, test_ctx)
def test_simple(self): with context.Context('test.bar', 5) as ctx: test_ctx = context.find_closest_context('test.bar') assert_equal(ctx, test_ctx)