Example #1
0
def test_warn(secho):
    """
    Tests that the warn command works correctly
    """

    warn('Hello, world!')
    secho.assert_called_with('Hello, world!', fg = 'yellow')
Example #2
0
def test_warn_formatting(secho):
    """
    Tests that the warn command passes on formatting
    """

    warn('Hello, world!', strikethrough = True)
    secho.assert_called_with(
        'Hello, world!',
        fg            = 'yellow',
        strikethrough = True,
    )