mirror of
https://github.com/donnemartin/interactive-coding-challenges
synced 2026-03-04 22:58:46 +00:00
Test for inplace modification of the array.
This commit is contained in:
@@ -11,10 +11,17 @@ class TestReverse(object):
|
||||
['r', 'a', 'b', ' ', 'o', 'o', 'f'])
|
||||
print('Success: test_reverse')
|
||||
|
||||
def test_reverse_inplace(self):
|
||||
target_list = ['f', 'o', 'o', ' ', 'b', 'a', 'r']
|
||||
list_of_chars(target_list)
|
||||
assert_equal(target_list, ['r', 'a', 'b', ' ', 'o', 'o', 'f'])
|
||||
print('Success: test_reverse_inplace')
|
||||
|
||||
|
||||
def main():
|
||||
test = TestReverse()
|
||||
test.test_reverse()
|
||||
test.test_reverse_inplace()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
Reference in New Issue
Block a user