Fix test case failures.
This commit is contained in:
parent
99f16e94ba
commit
cf9848fc86
@ -240,7 +240,7 @@ def test_print_bookmark(capsys, setup):
|
|||||||
# calling with nonexistent index
|
# calling with nonexistent index
|
||||||
bdb.print_bookmark(1)
|
bdb.print_bookmark(1)
|
||||||
out, err = capsys.readouterr()
|
out, err = capsys.readouterr()
|
||||||
assert out == "No matching index\n"
|
assert out == "[ERROR] No matching index"
|
||||||
assert err == ''
|
assert err == ''
|
||||||
|
|
||||||
# adding bookmarks
|
# adding bookmarks
|
||||||
|
@ -54,19 +54,6 @@ def test_sigint_handler(capsys):
|
|||||||
assert out == ''
|
assert out == ''
|
||||||
assert err == "\nInterrupted.\n"
|
assert err == "\nInterrupted.\n"
|
||||||
|
|
||||||
def test_printmsg(capsys):
|
|
||||||
# call with two args
|
|
||||||
printmsg("test", "ERROR")
|
|
||||||
out, err = capsys.readouterr()
|
|
||||||
assert out == "\x1b[1mERROR: \x1b[21mtest\x1b[0m\n"
|
|
||||||
assert err == ''
|
|
||||||
|
|
||||||
# call with one arg
|
|
||||||
printmsg("message")
|
|
||||||
out, err = capsys.readouterr()
|
|
||||||
assert out == "message\n"
|
|
||||||
assert err == ''
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
Loading…
Reference in New Issue
Block a user