Update remove dupes unit test to handle more cases.

This commit is contained in:
Donne Martin 2016-02-10 06:33:30 -05:00
parent 71cb434de7
commit 27a0bf786e
3 changed files with 19 additions and 10 deletions

View File

@ -141,6 +141,9 @@
"\n",
" print('Test: General case, duplicates')\n",
" linked_list.insert_to_front(1)\n",
" linked_list.insert_to_front(1)\n",
" linked_list.insert_to_front(3)\n",
" linked_list.insert_to_front(2)\n",
" linked_list.insert_to_front(3)\n",
" linked_list.insert_to_front(1)\n",
" linked_list.insert_to_front(1)\n",
@ -176,21 +179,21 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"display_name": "Python 3",
"language": "python",
"name": "python2"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.10"
"pygments_lexer": "ipython3",
"version": "3.4.3"
}
},
"nbformat": 4,

View File

@ -191,6 +191,9 @@
"\n",
" print('Test: General case, duplicates')\n",
" linked_list.insert_to_front(1)\n",
" linked_list.insert_to_front(1)\n",
" linked_list.insert_to_front(3)\n",
" linked_list.insert_to_front(2)\n",
" linked_list.insert_to_front(3)\n",
" linked_list.insert_to_front(1)\n",
" linked_list.insert_to_front(1)\n",
@ -241,21 +244,21 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"display_name": "Python 3",
"language": "python",
"name": "python2"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.10"
"pygments_lexer": "ipython3",
"version": "3.4.3"
}
},
"nbformat": 4,

View File

@ -15,6 +15,9 @@ class TestRemoveDupes(object):
print('Test: General case, duplicates')
linked_list.insert_to_front(1)
linked_list.insert_to_front(1)
linked_list.insert_to_front(3)
linked_list.insert_to_front(2)
linked_list.insert_to_front(3)
linked_list.insert_to_front(1)
linked_list.insert_to_front(1)