mirror of
https://github.com/donnemartin/interactive-coding-challenges.git
synced 2024-03-22 13:11:13 +08:00
21 lines
512 B
Python
21 lines
512 B
Python
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() |