Fix test case failures.

This commit is contained in:
Arun Prakash Jana 2016-07-01 01:17:09 +05:30
parent 99f16e94ba
commit cf9848fc86
No known key found for this signature in database
GPG Key ID: C0A712ED95043DCB
2 changed files with 1 additions and 14 deletions

View File

@ -240,7 +240,7 @@ def test_print_bookmark(capsys, setup):
# calling with nonexistent index
bdb.print_bookmark(1)
out, err = capsys.readouterr()
assert out == "No matching index\n"
assert out == "[ERROR] No matching index"
assert err == ''
# adding bookmarks

View File

@ -54,19 +54,6 @@ def test_sigint_handler(capsys):
assert out == ''
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__":
unittest.main()