@@ -1436,11 +1436,11 @@ def test_pseudo_raw_input_tty_rawinput_false(capsys):
1436
1436
#
1437
1437
# the only way to make this testable is to mock the builtin input()
1438
1438
# function
1439
- def piped_input_rawinput_true (capsys , echo , command ):
1439
+ def piped_rawinput_true (capsys , echo , command ):
1440
1440
m = mock .Mock (name = 'input' , side_effect = [command , 'quit' ])
1441
1441
sm .input = m
1442
1442
1443
- # run the cmdloop, which should pull input from our mocked input_list
1443
+ # run the cmdloop, which should pull input from our mocked input
1444
1444
app = cmd2 .Cmd ()
1445
1445
app .use_rawinput = True
1446
1446
app .echo = echo
@@ -1449,16 +1449,16 @@ def piped_input_rawinput_true(capsys, echo, command):
1449
1449
out , err = capsys .readouterr ()
1450
1450
return (app , out )
1451
1451
1452
- def test_piped_input_rawinput_true_echo_true (capsys ):
1452
+ def test_pseudo_raw_input_piped_rawinput_true_echo_true (capsys ):
1453
1453
command = 'set'
1454
- app , out = piped_input_rawinput_true (capsys , True , command )
1454
+ app , out = piped_rawinput_true (capsys , True , command )
1455
1455
out = out .splitlines ()
1456
1456
assert out [0 ] == '{}{}' .format (app .prompt , command )
1457
1457
assert out [1 ] == 'abbrev: False'
1458
1458
1459
- def test_piped_input_rawinput_true_echo_false (capsys ):
1459
+ def test_pseudo_raw_input_piped_rawinput_true_echo_false (capsys ):
1460
1460
command = 'set'
1461
- app , out = piped_input_rawinput_true (capsys , False , command )
1461
+ app , out = piped_rawinput_true (capsys , False , command )
1462
1462
firstline = out .splitlines ()[0 ]
1463
1463
assert firstline == 'abbrev: False'
1464
1464
assert not '{}{}' .format (app .prompt , command ) in out
@@ -1468,11 +1468,11 @@ def test_piped_input_rawinput_true_echo_false(capsys):
1468
1468
#
1469
1469
# the only way to make this testable is to pass a file handle
1470
1470
# as stdin
1471
- def piped_input_rawinput_false (capsys , echo , command ):
1471
+ def piped_rawinput_false (capsys , echo , command ):
1472
1472
# mock up the input
1473
1473
fakein = io .StringIO (u'{}' .format (command ))
1474
1474
1475
- # run the cmdloop, which should pull input from stdin
1475
+ # run the cmdloop, telling it where to get input from
1476
1476
app = cmd2 .Cmd (stdin = fakein )
1477
1477
app .use_rawinput = False
1478
1478
app .echo = echo
@@ -1481,16 +1481,16 @@ def piped_input_rawinput_false(capsys, echo, command):
1481
1481
out , err = capsys .readouterr ()
1482
1482
return (app , out )
1483
1483
1484
- def test_piped_input_rawinput_false_echo_true (capsys ):
1484
+ def test_pseudo_raw_input_piped_rawinput_false_echo_true (capsys ):
1485
1485
command = 'set'
1486
- app , out = piped_input_rawinput_false (capsys , True , command )
1486
+ app , out = piped_rawinput_false (capsys , True , command )
1487
1487
out = out .splitlines ()
1488
1488
assert out [0 ] == '{}{}' .format (app .prompt , command )
1489
1489
assert out [1 ] == 'abbrev: False'
1490
1490
1491
- def test_piped_input_rawinput_false_echo_false (capsys ):
1491
+ def test_pseudo_raw_input_piped_rawinput_false_echo_false (capsys ):
1492
1492
command = 'set'
1493
- app , out = piped_input_rawinput_false (capsys , False , command )
1493
+ app , out = piped_rawinput_false (capsys , False , command )
1494
1494
firstline = out .splitlines ()[0 ]
1495
1495
assert firstline == 'abbrev: False'
1496
1496
assert not '{}{}' .format (app .prompt , command ) in out
0 commit comments