From 27a0bf786e91e24d8a9d3dc1d297bd44fabba6e5 Mon Sep 17 00:00:00 2001 From: Donne Martin Date: Wed, 10 Feb 2016 06:33:30 -0500 Subject: [PATCH] Update remove dupes unit test to handle more cases. --- .../remove_duplicates_challenge.ipynb | 13 ++++++++----- .../remove_duplicates_solution.ipynb | 13 ++++++++----- .../remove_duplicates/test_remove_duplicates.py | 3 +++ 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/linked_lists/remove_duplicates/remove_duplicates_challenge.ipynb b/linked_lists/remove_duplicates/remove_duplicates_challenge.ipynb index 81641a5..496ba8e 100644 --- a/linked_lists/remove_duplicates/remove_duplicates_challenge.ipynb +++ b/linked_lists/remove_duplicates/remove_duplicates_challenge.ipynb @@ -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, diff --git a/linked_lists/remove_duplicates/remove_duplicates_solution.ipynb b/linked_lists/remove_duplicates/remove_duplicates_solution.ipynb index 43a0163..b297aa6 100644 --- a/linked_lists/remove_duplicates/remove_duplicates_solution.ipynb +++ b/linked_lists/remove_duplicates/remove_duplicates_solution.ipynb @@ -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, diff --git a/linked_lists/remove_duplicates/test_remove_duplicates.py b/linked_lists/remove_duplicates/test_remove_duplicates.py index 34a9085..8f58881 100644 --- a/linked_lists/remove_duplicates/test_remove_duplicates.py +++ b/linked_lists/remove_duplicates/test_remove_duplicates.py @@ -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)