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

Function test_when_pizza

tests/test_example_when.py:30–52  ·  view source on GitHub ↗
(example_app)

Source from the content-addressed store, hash-verified

28
29
30def test_when_pizza(example_app):
31 example_app.expect('? Do you like bacon? (Y/n)')
32 example_app.write('n')
33
34 example_app.expect(textwrap.dedent("""\
35 ? Do you like bacon? No
36 ? Ok... Do you like pizza? (y/N)"""))
37 example_app.write('y')
38
39 example_app.expect(textwrap.dedent("""\
40 ? Ok... Do you like pizza? Yes
41 ? Whew! What is your favorite type of pizza? """))
42 example_app.writeline('Toscana')
43
44 example_app.expect(textwrap.dedent("""\
45 ? Whew! What is your favorite type of pizza? Toscana
46 {
47 "bacon": false,
48 "favorite": "Toscana",
49 "pizza": true
50 }
51
52 """))
53
54
55def test_when_no_thanks(example_app):

Callers

nothing calls this directly

Calls 3

expectMethod · 0.80
writeMethod · 0.80
writelineMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…