MCPcopy Index your code
hub / github.com/python-websockets/websockets / assertGeneratorReturns

Method assertGeneratorReturns

tests/utils.py:83–90  ·  view source on GitHub ↗

Check that a generator-based coroutine completes and return its value.

(self, gen)

Source from the content-addressed store, hash-verified

81 next(gen)
82
83 def assertGeneratorReturns(self, gen):
84 """
85 Check that a generator-based coroutine completes and return its value.
86
87 """
88 with self.assertRaises(StopIteration) as raised:
89 next(gen)
90 return raised.exception.value
91
92
93class DeprecationTestCase(unittest.TestCase):

Callers 15

test_read_lineMethod · 0.80
test_read_exactMethod · 0.80
test_read_to_eofMethod · 0.80
test_discardMethod · 0.80
parseMethod · 0.80

Calls

no outgoing calls

Tested by 15

test_read_lineMethod · 0.64
test_read_exactMethod · 0.64
test_read_to_eofMethod · 0.64
test_discardMethod · 0.64
parseMethod · 0.64