Added rotation challenge and solution.

This commit is contained in:
Donne Martin
2015-06-29 20:30:47 -04:00
parent a7a0b0a77c
commit c8e65593d4
3 changed files with 195 additions and 15 deletions

View File

@@ -0,0 +1,19 @@
from nose.tools import assert_equal
class TestRotation(object):
def test_rotation(self):
assert_equal(is_rotation('o', 'oo'), False)
assert_equal(is_rotation(None, 'foo'), False)
assert_equal(is_rotation('', 'foo'), False)
assert_equal(is_rotation('', ''), True)
assert_equal(is_rotation('foobarbaz', 'barbazfoo'), True)
print('Success: test_rotation')
def main():
test = TestRotation()
test.test_rotation()
if __name__ == '__main__':
main()