MCPcopy Create free account
hub / github.com/Pylons/webtest / check_iterator

Function check_iterator

webtest/lint.py:555–565  ·  view source on GitHub ↗
(iterator)

Source from the content-addressed store, hash-verified

553
554
555def check_iterator(iterator):
556 valid_type = bytes
557 # Technically a bytes (str for py2.x) is legal, which is why it's a
558 # really bad idea, because it may cause the response to be returned
559 # character-by-character
560
561 if isinstance(iterator, valid_type):
562 raise AssertionError(
563 "You should not return a bytes as your application iterator, "
564 "instead return a single-item list containing that string."
565 )
566
567__all__ = ['middleware']

Callers 1

lint_appFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…