       ]
      }
     ],
     "source": [
      "%%writefile test_foo.py\n",
      "from nose.tools import assert_equal\n",
      "\n",
      "\n",
      "class TestFoo(object):\n",
      "\n",
 
</s> remove     "class TestFoo(object):\n",
    "\n",
    "    def test_foo(self):\n",
    "        assert_equal(foo(None), None)\n",
    "        assert_equal(foo(0), 0)\n",
    "        assert_equal(foo('bar'), 'bar')\n",
    "        print('Success: test_foo')\n",
 </s> add     "    def test_group_ordered(self):\n",
    "        assert_equal(group_ordered(None), None)\n",
    "        assert_equal(group_ordered([]), [])\n",
    "        assert_equal(group_ordered([1]), [1])\n",
    "        assert_equal(group_ordered([1,2,1,3,2]),[1,1,2,2,3])\n",
    "        assert_equal(group_ordered(['a','b','a']),['a','a','b'])\n",
    "        assert_equal(group_ordered([1,1,2,3,4,5,2,1]),[1,1,1,2,2,3,4,5])\n",
    "        assert_equal(group_ordered([1,2,3,4,3,4]),[1,2,3,3,4,4])\n", </s> remove       "Overwriting test_foo.py\n"
 </s> add       "Overwriting test_group_ordered.py\n" </s> remove     "%run -i test_foo.py"
 </s> add     "%run -i test_group_ordered.py" </s> remove    "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Success: test_foo\n"
     ]
    }
   ],
 </s> add    "outputs": [],
    "%%writefile test_group_ordered.py\n",
       ]
      }
     ],
     "source": [
    "%%writefile test_group_ordered.py\n",
      "from nose.tools import assert_equal\n",
      "\n",
      "\n",
      "class TestFoo(object):\n",
      "\n",
keep keep keep keep replace keep keep keep keep keep
 added both solutions w/ test 
arrays_strings/group_items/group_ordered_solution.ipynb