Example #1
0
 def test_not_found(self):
     test_ctx = context.find_closest_context("test")
     assert_equal(test_ctx, None)
Example #2
0
 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)
Example #3
0
 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)
Example #4
0
 def test_not_found(self):
     test_ctx = context.find_closest_context('test')
     assert_equal(test_ctx, None)
Example #5
0
 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)
Example #6
0
 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)