Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)
Ejemplo n.º 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)