Python tornado.gen.ReturnValueIgnoredError() Examples

The following are 30 code examples of tornado.gen.ReturnValueIgnoredError(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module tornado.gen , or try the search function .
Example #1
Source File: gen_test.py    From pySINDy with MIT License 5 votes vote down vote up
def test_sync_raise_return_value_tuple(self):
        @gen.engine
        def f():
            raise gen.Return((1, 2))

        with self.assertRaises(gen.ReturnValueIgnoredError):
            self.run_gen(f) 
Example #2
Source File: gen_test.py    From viewfinder with Apache License 2.0 5 votes vote down vote up
def test_async_raise_return_value_tuple(self):
        @gen.engine
        def f():
            yield gen.Task(self.io_loop.add_callback)
            raise gen.Return((1, 2))

        with self.assertRaises(gen.ReturnValueIgnoredError):
            self.run_gen(f) 
Example #3
Source File: gen_test.py    From viewfinder with Apache License 2.0 5 votes vote down vote up
def test_return_value(self):
        # It is an error to apply @gen.engine to a function that returns
        # a value.
        @gen.engine
        def f():
            return 42

        with self.assertRaises(gen.ReturnValueIgnoredError):
            self.run_gen(f) 
Example #4
Source File: gen_test.py    From teleport with Apache License 2.0 5 votes vote down vote up
def test_sync_raise_return_value(self):
        @gen.engine
        def f():
            raise gen.Return(42)

        with self.assertRaises(gen.ReturnValueIgnoredError):
            self.run_gen(f) 
Example #5
Source File: gen_test.py    From teleport with Apache License 2.0 5 votes vote down vote up
def test_sync_raise_return_value_tuple(self):
        @gen.engine
        def f():
            raise gen.Return((1, 2))

        with self.assertRaises(gen.ReturnValueIgnoredError):
            self.run_gen(f) 
Example #6
Source File: gen_test.py    From teleport with Apache License 2.0 5 votes vote down vote up
def test_async_raise_return_value(self):
        @gen.engine
        def f():
            yield gen.Task(self.io_loop.add_callback)
            raise gen.Return(42)

        with self.assertRaises(gen.ReturnValueIgnoredError):
            self.run_gen(f) 
Example #7
Source File: gen_test.py    From teleport with Apache License 2.0 5 votes vote down vote up
def test_async_raise_return_value_tuple(self):
        @gen.engine
        def f():
            yield gen.Task(self.io_loop.add_callback)
            raise gen.Return((1, 2))

        with self.assertRaises(gen.ReturnValueIgnoredError):
            self.run_gen(f) 
Example #8
Source File: gen_test.py    From teleport with Apache License 2.0 5 votes vote down vote up
def test_return_value(self):
        # It is an error to apply @gen.engine to a function that returns
        # a value.
        @gen.engine
        def f():
            return 42

        with self.assertRaises(gen.ReturnValueIgnoredError):
            self.run_gen(f) 
Example #9
Source File: gen_test.py    From pySINDy with MIT License 5 votes vote down vote up
def test_sync_raise_return_value(self):
        @gen.engine
        def f():
            raise gen.Return(42)

        with self.assertRaises(gen.ReturnValueIgnoredError):
            self.run_gen(f) 
Example #10
Source File: gen_test.py    From viewfinder with Apache License 2.0 5 votes vote down vote up
def test_async_raise_return_value(self):
        @gen.engine
        def f():
            yield gen.Task(self.io_loop.add_callback)
            raise gen.Return(42)

        with self.assertRaises(gen.ReturnValueIgnoredError):
            self.run_gen(f) 
Example #11
Source File: gen_test.py    From pySINDy with MIT License 5 votes vote down vote up
def test_async_raise_return_value(self):
        @gen.engine
        def f():
            yield gen.Task(self.io_loop.add_callback)
            raise gen.Return(42)

        with self.assertRaises(gen.ReturnValueIgnoredError):
            self.run_gen(f) 
Example #12
Source File: gen_test.py    From pySINDy with MIT License 5 votes vote down vote up
def test_async_raise_return_value_tuple(self):
        @gen.engine
        def f():
            yield gen.Task(self.io_loop.add_callback)
            raise gen.Return((1, 2))

        with self.assertRaises(gen.ReturnValueIgnoredError):
            self.run_gen(f) 
Example #13
Source File: gen_test.py    From pySINDy with MIT License 5 votes vote down vote up
def test_return_value(self):
        # It is an error to apply @gen.engine to a function that returns
        # a value.
        @gen.engine
        def f():
            return 42

        with self.assertRaises(gen.ReturnValueIgnoredError):
            self.run_gen(f) 
Example #14
Source File: gen_test.py    From EventGhost with GNU General Public License v2.0 5 votes vote down vote up
def test_sync_raise_return_value(self):
        @gen.engine
        def f():
            raise gen.Return(42)

        with self.assertRaises(gen.ReturnValueIgnoredError):
            self.run_gen(f) 
Example #15
Source File: gen_test.py    From EventGhost with GNU General Public License v2.0 5 votes vote down vote up
def test_sync_raise_return_value_tuple(self):
        @gen.engine
        def f():
            raise gen.Return((1, 2))

        with self.assertRaises(gen.ReturnValueIgnoredError):
            self.run_gen(f) 
Example #16
Source File: gen_test.py    From EventGhost with GNU General Public License v2.0 5 votes vote down vote up
def test_async_raise_return_value(self):
        @gen.engine
        def f():
            yield gen.Task(self.io_loop.add_callback)
            raise gen.Return(42)

        with self.assertRaises(gen.ReturnValueIgnoredError):
            self.run_gen(f) 
Example #17
Source File: gen_test.py    From EventGhost with GNU General Public License v2.0 5 votes vote down vote up
def test_async_raise_return_value_tuple(self):
        @gen.engine
        def f():
            yield gen.Task(self.io_loop.add_callback)
            raise gen.Return((1, 2))

        with self.assertRaises(gen.ReturnValueIgnoredError):
            self.run_gen(f) 
Example #18
Source File: gen_test.py    From EventGhost with GNU General Public License v2.0 5 votes vote down vote up
def test_return_value(self):
        # It is an error to apply @gen.engine to a function that returns
        # a value.
        @gen.engine
        def f():
            return 42

        with self.assertRaises(gen.ReturnValueIgnoredError):
            self.run_gen(f) 
Example #19
Source File: gen_test.py    From tornado-zh with MIT License 5 votes vote down vote up
def test_return_value(self):
        # It is an error to apply @gen.engine to a function that returns
        # a value.
        @gen.engine
        def f():
            return 42

        with self.assertRaises(gen.ReturnValueIgnoredError):
            self.run_gen(f) 
Example #20
Source File: gen_test.py    From tornado-zh with MIT License 5 votes vote down vote up
def test_sync_raise_return_value_tuple(self):
        @gen.engine
        def f():
            raise gen.Return((1, 2))

        with self.assertRaises(gen.ReturnValueIgnoredError):
            self.run_gen(f) 
Example #21
Source File: gen_test.py    From tornado-zh with MIT License 5 votes vote down vote up
def test_async_raise_return_value(self):
        @gen.engine
        def f():
            yield gen.Task(self.io_loop.add_callback)
            raise gen.Return(42)

        with self.assertRaises(gen.ReturnValueIgnoredError):
            self.run_gen(f) 
Example #22
Source File: gen_test.py    From tornado-zh with MIT License 5 votes vote down vote up
def test_async_raise_return_value_tuple(self):
        @gen.engine
        def f():
            yield gen.Task(self.io_loop.add_callback)
            raise gen.Return((1, 2))

        with self.assertRaises(gen.ReturnValueIgnoredError):
            self.run_gen(f) 
Example #23
Source File: gen_test.py    From tornado-zh with MIT License 5 votes vote down vote up
def test_return_value(self):
        # It is an error to apply @gen.engine to a function that returns
        # a value.
        @gen.engine
        def f():
            return 42

        with self.assertRaises(gen.ReturnValueIgnoredError):
            self.run_gen(f) 
Example #24
Source File: gen_test.py    From tornado-zh with MIT License 5 votes vote down vote up
def test_sync_raise_return_value(self):
        @gen.engine
        def f():
            raise gen.Return(42)

        with self.assertRaises(gen.ReturnValueIgnoredError):
            self.run_gen(f) 
Example #25
Source File: gen_test.py    From tornado-zh with MIT License 5 votes vote down vote up
def test_sync_raise_return_value_tuple(self):
        @gen.engine
        def f():
            raise gen.Return((1, 2))

        with self.assertRaises(gen.ReturnValueIgnoredError):
            self.run_gen(f) 
Example #26
Source File: gen_test.py    From tornado-zh with MIT License 5 votes vote down vote up
def test_async_raise_return_value(self):
        @gen.engine
        def f():
            yield gen.Task(self.io_loop.add_callback)
            raise gen.Return(42)

        with self.assertRaises(gen.ReturnValueIgnoredError):
            self.run_gen(f) 
Example #27
Source File: gen_test.py    From tornado-zh with MIT License 5 votes vote down vote up
def test_async_raise_return_value_tuple(self):
        @gen.engine
        def f():
            yield gen.Task(self.io_loop.add_callback)
            raise gen.Return((1, 2))

        with self.assertRaises(gen.ReturnValueIgnoredError):
            self.run_gen(f) 
Example #28
Source File: gen_test.py    From tornado-zh with MIT License 5 votes vote down vote up
def test_sync_raise_return_value(self):
        @gen.engine
        def f():
            raise gen.Return(42)

        with self.assertRaises(gen.ReturnValueIgnoredError):
            self.run_gen(f) 
Example #29
Source File: gen_test.py    From viewfinder with Apache License 2.0 5 votes vote down vote up
def test_sync_raise_return_value(self):
        @gen.engine
        def f():
            raise gen.Return(42)

        with self.assertRaises(gen.ReturnValueIgnoredError):
            self.run_gen(f) 
Example #30
Source File: gen_test.py    From viewfinder with Apache License 2.0 5 votes vote down vote up
def test_sync_raise_return_value_tuple(self):
        @gen.engine
        def f():
            raise gen.Return((1, 2))

        with self.assertRaises(gen.ReturnValueIgnoredError):
            self.run_gen(f)