new challenge: reverse_words

This commit is contained in:
mag6367
2015-07-16 10:20:18 -05:00
parent 502c4d77e4
commit a567898dab
4 changed files with 333 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
from nose.tools import assert_equal
class UnitTest (object):
def testReverseWords(self, func):
assert_equal(func('the sun is hot'), 'eht nus si toh')
assert_equal(func(''), None)
assert_equal(func('123 456 789'), '321 654 987')
assert_equal(func('magic'), 'cigam')
print('Success: reverse_words')
def main():
test = UnitTest()
test.testReverseWords(reverse_words)
if __name__=="__main__":
main()