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

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

src/q/l/qless-py-0.10.1/test/test_worker.py   qless-py(Download)
    def test_kill(self):
        '''The base worker class' kill method should raise an exception'''
        self.assertRaises(NotImplementedError, self.worker.kill, 1)
 
    def test_clean(self):

src/q/l/qless-py-HEAD/test/test_worker.py   qless-py(Download)
    def test_kill(self):
        '''The base worker class' kill method should raise an exception'''
        self.assertRaises(NotImplementedError, self.worker.kill, 1)
 
    def test_clean(self):

src/q/l/qless-py-0.10.1/test/test_events.py   qless-py(Download)
    def test_not_implemented(self):
        '''Ensure missing events throw errors'''
        self.assertRaises(
            NotImplementedError, self.client.events.on, 'foo', int)
 

src/q/l/qless-core-HEAD/test/test_general.py   qless-core(Download)
    def test_keys(self):
        '''No keys may be provided to the script'''
        self.assertRaises(redis.ResponseError, self.lua.raw, 'foo')
 
    def test_unknown_function(self):
        '''If the API function is unknown, it should throw an error'''
        self.assertRaises(redis.ResponseError, self.lua, 'foo')
    def test_no_time(self):
        '''If we neglect to provide a time, it should throw an error'''
        self.assertRaises(redis.ResponseError, self.lua, 'put')
 
    def test_malformed_time(self):
        '''If we provide a non-numeric time, it should throw an error'''
        self.assertRaises(redis.ResponseError, self.lua, 'put', 'foo')

src/q/l/qless-py-HEAD/test/test_events.py   qless-py(Download)
    def test_not_implemented(self):
        '''Ensure missing events throw errors'''
        self.assertRaises(
            NotImplementedError, self.client.events.on, 'foo', int)
 

src/q/l/qless-core-HEAD/test/test_asserts.py   qless-core(Download)
            '''Raises wrong error'''
            self.assertRaisesRegexp(NotImplementedError, 'base 10', int, 'foo')
        self.assertRaises(AssertionError, func)
 
        def func():
            '''Doesn't match regex'''
            self.assertRaisesRegexp(ValueError, 'sklfjlskjflksjfs', int, 'foo')
        self.assertRaises(AssertionError, func)
        self.assertRaises(ValueError, int, 'foo')
            '''Doesn't throw any error'''
            self.assertRaisesRegexp(ValueError, 'base 10', int, 5)
        self.assertRaises(AssertionError, func)
 

src/q/l/qless-py-0.10.1/test/test_job.py   qless-py(Download)
    def test_attribute_error(self):
        '''Raises an attribute error for nonexistent attributes'''
        self.client.queues['foo'].put(Job, {}, jid='jid')
        self.assertRaises(AttributeError, lambda: self.client.jobs['jid'].foo)
 
    def test_heartbeat_fail(self):
        '''Failed heartbeats raise an error'''
        from qless.exceptions import LostLockException
        self.client.queues['foo'].put('Foo', {}, jid='jid')
        self.assertRaises(LostLockException, self.client.jobs['jid'].heartbeat)
    def test_retry_fail(self):
        '''Retry raises an error if retry fails'''
        from qless.exceptions import QlessException
        self.client.queues['foo'].put('Foo', {}, jid='jid')
        self.assertRaises(QlessException, self.client.jobs['jid'].retry)
    def test_attribute_error(self):
        '''Raises attribute errors for non-attributes'''
        self.client.queues['foo'].recur('Foo', {}, 60, jid='jid')
        self.assertRaises(AttributeError, lambda: self.client.jobs['jid'].foo)
 

src/q/l/qless-py-HEAD/test/test_job.py   qless-py(Download)
    def test_attribute_error(self):
        '''Raises an attribute error for nonexistent attributes'''
        self.client.queues['foo'].put(Job, {}, jid='jid')
        self.assertRaises(AttributeError, lambda: self.client.jobs['jid'].foo)
 
    def test_heartbeat_fail(self):
        '''Failed heartbeats raise an error'''
        from qless.exceptions import LostLockException
        self.client.queues['foo'].put('Foo', {}, jid='jid')
        self.assertRaises(LostLockException, self.client.jobs['jid'].heartbeat)
    def test_retry_fail(self):
        '''Retry raises an error if retry fails'''
        from qless.exceptions import QlessException
        self.client.queues['foo'].put('Foo', {}, jid='jid')
        self.assertRaises(QlessException, self.client.jobs['jid'].retry)
    def test_attribute_error(self):
        '''Raises attribute errors for non-attributes'''
        self.client.queues['foo'].recur('Foo', {}, 60, jid='jid')
        self.assertRaises(AttributeError, lambda: self.client.jobs['jid'].foo)
 

src/q/l/qless-py-0.10.1/test/test_config.py   qless-py(Download)
    def test_attribute_error(self):
        '''Only has the 'all' attribute'''
        self.assertRaises(AttributeError, lambda: self.client.config.foo)
 
    def test_len(self):

src/q/l/qless-py-HEAD/test/test_config.py   qless-py(Download)
    def test_attribute_error(self):
        '''Only has the 'all' attribute'''
        self.assertRaises(AttributeError, lambda: self.client.config.foo)
 
    def test_len(self):

  1 | 2  Next