Start adding some unit tests.
author |
Steve Losh <steve@stevelosh.com> |
date |
Fri, 27 Nov 2009 14:19:35 -0500 |
parents |
(none) |
children |
(none) |
'''Test output without keywords.'''
from nose import *
from util import *
@with_setup(setup_sandbox, teardown_sandbox)
def test_blank():
output = prompt(fs='')
assert output == ''
@with_setup(setup_sandbox, teardown_sandbox)
def test_text():
output = prompt(fs='test one two three')
assert output == 'test one two three'
@with_setup(setup_sandbox, teardown_sandbox)
def test_invalid_keyword():
output = prompt(fs='{invalidkeyword}')
assert output == '{invalidkeyword}'