Did I find the right examples for you? yes no

All Samples(4)  |  Call(4)  |  Derive(0)  |  Import(0)

src/y/a/yaak.inject-0.2.1/yaak/tests/test_inject.py   yaak.inject(Download)
    def test_same_instance_when_accessing_a_singleton_feature_twice(self):
        self.provider.provide('service', object)
        o = self.Injected()
        instance1 = o.service
        instance2 = o.service
        self.assert_(instance1 is instance2)
 
    def test_same_instance_when_accessing_a_transient_feature_twice(self):
        self.provider.provide('service', object, scope=inject.Scope.Transient)
        o = self.Injected()
    def test_different_instances_when_accessing_two_transient_attributes(self):
        self.provider.provide('service', object, scope=inject.Scope.Transient)
        o = self.Injected()
        self.assert_(not o.service is o.another_service)
 
    def test_missing_feature(self):
        o = self.Injected()