mirror of
https://github.com/donnemartin/interactive-coding-challenges
synced 2026-01-09 19:08:02 +00:00
Test for inplace modification of the array.
This commit is contained in:
@@ -121,10 +121,17 @@
|
||||
" ['r', 'a', 'b', ' ', 'o', 'o', 'f'])\n",
|
||||
" print('Success: test_reverse')\n",
|
||||
"\n",
|
||||
" def test_reverse_inplace(self):\n",
|
||||
" target_list = ['f', 'o', 'o', ' ', 'b', 'a', 'r']\n",
|
||||
" list_of_chars(target_list)\n",
|
||||
" assert_equal(target_list, ['r', 'a', 'b', ' ', 'o', 'o', 'f'])\n",
|
||||
" print('Success: test_reverse_inplace')\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"def main():\n",
|
||||
" test = TestReverse()\n",
|
||||
" test.test_reverse()\n",
|
||||
" test.test_reverse_inplace()\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"if __name__ == '__main__':\n",
|
||||
|
||||
Reference in New Issue
Block a user