Example #1
0
 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)
Example #2
0
 def test_by_name(self):
     with context.Context("test.foo") as ctx:
         test_ctx = context.find_context("test.foo")
         assert_equal(test_ctx, ctx)
Example #3
0
 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)
Example #4
0
 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)
Example #5
0
 def test_by_name(self):
     with context.Context('test.foo') as ctx:
         test_ctx = context.find_context('test.foo')
         assert_equal(test_ctx, ctx)
Example #6
0
 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)