Did I find the right examples for you? yes no      Crawl my project      Python Jobs

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

src/m/p/mpdlcd-0.4.0/tests/test_mpdhooks.py   mpdlcd(Download)
        mpdhooks.HookRegistry.register_hook('some_hook', SomeHook)
 
        reg = mpdhooks.HookRegistry()
 
        hook = reg.create('some_hook')
        mpdhooks.HookRegistry.register_hook('some_hook', SomeHook)
 
        reg = mpdhooks.HookRegistry()
 
        hook = reg.create('some_hook')
            name = 'some_hook'
 
        reg = mpdhooks.HookRegistry()
 
        hook = reg.create('some_hook')
        mpdhooks.HookRegistry.register_hook('some_hook', SomeHook)
 
        reg = mpdhooks.HookRegistry()
 
        hook = reg.create('some_hook')
        self.assertEqual(SomeHook, hook.__class__)
 
    def test_invalid_name(self):
        """Creating an invalid hook should fail."""
        reg = mpdhooks.HookRegistry()