MCPcopy Index your code
hub / github.com/CITGuru/PyInquirer / write

Method write

tests/helpers.py:152–161  ·  view source on GitHub ↗

Write the unicode string ``s`` to the pseudoterminal. This intends to make tests a little less verbose. Returns the number of bytes written.

(self, s)

Source from the content-addressed store, hash-verified

150 return s
151
152 def write(self, s):
153 """Write the unicode string ``s`` to the pseudoterminal.
154 This intends to make tests a little less verbose.
155
156 Returns the number of bytes written.
157 """
158 if isinstance(s, basestring):
159 b = s.encode(self.encoding)
160 count = super(SimplePty, self).write(b)
161 return count
162
163 def writeline(self, s):
164 """Syntactic sugar to add a '\n' at the end of the .

Callers 13

writelineMethod · 0.95
editMethod · 0.80
test_checkboxFunction · 0.80
test_inputFunction · 0.80
test_rawlistFunction · 0.80
test_without_expandFunction · 0.80
test_with_expandFunction · 0.80
test_pizzaFunction · 0.80
test_when_baconFunction · 0.80
test_when_pizzaFunction · 0.80
test_when_no_thanksFunction · 0.80
test_hierarchicalFunction · 0.80

Calls

no outgoing calls

Tested by 11

test_checkboxFunction · 0.64
test_inputFunction · 0.64
test_rawlistFunction · 0.64
test_without_expandFunction · 0.64
test_with_expandFunction · 0.64
test_pizzaFunction · 0.64
test_when_baconFunction · 0.64
test_when_pizzaFunction · 0.64
test_when_no_thanksFunction · 0.64
test_hierarchicalFunction · 0.64
test_listFunction · 0.64