],
"language": "python",
"metadata": {},
- "outputs": [],
- "prompt_number": 4
+ "outputs": []
},
{
"cell_type": "markdown",
],
"language": "python",
"metadata": {},
- "outputs": [
- {
- "output_type": "pyout",
- "prompt_number": 5,
- "text": [
- "117"
- ]
- }
- ],
- "prompt_number": 5
+ "outputs": []
},
{
"cell_type": "markdown",
],
"language": "python",
"metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "2011-04-22 21:06 Grizzly 36\r\n",
- "2011-04-23 14:12 Elk 25\r\n",
- "2011-04-23 10:24 Elk 26\r\n",
- "2011-04-23 20:08 Wolverine 31\r\n",
- "2011-04-23 18:46 Muskox 20\r\n"
- ]
- }
- ],
- "prompt_number": 6
+ "outputs": []
},
{
"cell_type": "markdown",
],
"language": "python",
"metadata": {},
- "outputs": [],
- "prompt_number": 7
+ "outputs": []
},
{
"cell_type": "markdown",
],
"language": "python",
"metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "2011-04-22 21:06 Grizzly 36\r\n",
- "2011-04-23 14:12 Elk 25\r\n",
- "2011-04-23 10:24 Elk 26\r\n",
- "2011-04-23 20:08 Wolverine 31\r\n",
- "2011-04-23 18:46 Muskox 20\r\n"
- ]
- }
- ],
- "prompt_number": 8
+ "outputs": []
},
{
"cell_type": "code",
],
"language": "python",
"metadata": {},
- "outputs": [
- {
- "output_type": "pyout",
- "prompt_number": 9,
- "text": [
- "(['2011-04-22', '2011-04-23', '2011-04-23', '2011-04-23', '2011-04-23'],\n",
- " ['21:06', '14:12', '10:24', '20:08', '18:46'],\n",
- " ['Grizzly', 'Elk', 'Elk', 'Wolverine', 'Muskox'],\n",
- " [36, 25, 26, 31, 20])"
- ]
- }
- ],
- "prompt_number": 9
+ "outputs": []
},
{
"cell_type": "markdown",
],
"language": "python",
"metadata": {},
- "outputs": [],
- "prompt_number": 10
+ "outputs": []
},
{
"cell_type": "markdown",
],
"language": "python",
"metadata": {},
- "outputs": [
- {
- "output_type": "pyout",
- "prompt_number": 11,
- "text": [
- "117"
- ]
- }
- ],
- "prompt_number": 11
+ "outputs": []
},
{
"cell_type": "markdown",
],
"language": "python",
"metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Looks good!\n"
- ]
- }
- ],
- "prompt_number": 12
+ "outputs": []
},
{
"cell_type": "markdown",
],
"language": "python",
"metadata": {},
- "outputs": [],
- "prompt_number": 13
+ "outputs": []
},
{
"cell_type": "markdown",
],
"language": "python",
"metadata": {},
- "outputs": [],
- "prompt_number": 14
+ "outputs": []
},
{
"cell_type": "markdown",
],
"language": "python",
"metadata": {},
- "outputs": [
- {
- "ename": "AssertionError",
- "evalue": "2 + 2 didn't equal 4",
- "output_type": "pyerr",
- "traceback": [
- "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[0;31mAssertionError\u001b[0m Traceback (most recent call last)",
- "\u001b[0;32m<ipython-input-15-2d797333ff4c>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0;32massert\u001b[0m \u001b[0;36m4\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0madd_two_plus_two\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"2 + 2 didn't equal 4\"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 6\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 7\u001b[0;31m \u001b[0mtest_add_two_plus_two_equals_four\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
- "\u001b[0;32m<ipython-input-15-2d797333ff4c>\u001b[0m in \u001b[0;36mtest_add_two_plus_two_equals_four\u001b[0;34m()\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mtest_add_two_plus_two_equals_four\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 5\u001b[0;31m \u001b[0;32massert\u001b[0m \u001b[0;36m4\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0madd_two_plus_two\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"2 + 2 didn't equal 4\"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 6\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 7\u001b[0m \u001b[0mtest_add_two_plus_two_equals_four\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
- "\u001b[0;31mAssertionError\u001b[0m: 2 + 2 didn't equal 4"
- ]
- }
- ],
- "prompt_number": 15
+ "outputs": []
},
{
"cell_type": "markdown",
],
"language": "python",
"metadata": {},
- "outputs": [],
- "prompt_number": 16
+ "outputs": []
},
{
"cell_type": "code",
],
"language": "python",
"metadata": {},
- "outputs": [
- {
- "html": [
- "<div id=\"ipython_nose_5e87717b84c447ad93143bde900e1715\"></div>"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_5e87717b84c447ad93143bde900e1715 = $(\"#ipython_nose_5e87717b84c447ad93143bde900e1715\");"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_5e87717b84c447ad93143bde900e1715.append($(\"<span>.</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_5e87717b84c447ad93143bde900e1715.append($(\"<span>E</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_5e87717b84c447ad93143bde900e1715.append($(\"<span>F</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "delete document.ipython_nose_5e87717b84c447ad93143bde900e1715;"
- ],
- "output_type": "display_data"
- },
- {
- "html": [
- " <style type=\"text/css\">\n",
- " span.nosefailedfunc {\n",
- " font-family: monospace;\n",
- " font-weight: bold;\n",
- " }\n",
- " div.noseresults {\n",
- " width: 100%;\n",
- " }\n",
- " div.nosebar {\n",
- " float: left;\n",
- " padding: 1ex 0px 1ex 0px;\n",
- " }\n",
- " div.nosebar.fail {\n",
- " background: #ff3019; /* Old browsers */\n",
- " /* FF3.6+ */\n",
- " background: -moz-linear-gradient(top, #ff3019 0%, #cf0404 100%);\n",
- " /* Chrome,Safari4+ */\n",
- " background: -webkit-gradient(linear, left top, left bottom,\n",
- " color-stop(0%,#ff3019),\n",
- " color-stop(100%,#cf0404));\n",
- " /* Chrome10+,Safari5.1+ */\n",
- " background: -webkit-linear-gradient(top, #ff3019 0%,#cf0404 100%);\n",
- " /* Opera 11.10+ */\n",
- " background: -o-linear-gradient(top, #ff3019 0%,#cf0404 100%);\n",
- " /* IE10+ */\n",
- " background: -ms-linear-gradient(top, #ff3019 0%,#cf0404 100%);\n",
- " /* W3C */\n",
- " background: linear-gradient(to bottom, #ff3019 0%,#cf0404 100%);\n",
- " }\n",
- " div.nosebar.pass {\n",
- " background: #52b152;\n",
- " background: -moz-linear-gradient(top, #52b152 1%, #008a00 100%);\n",
- " background: -webkit-gradient(linear, left top, left bottom,\n",
- " color-stop(1%,#52b152),\n",
- " color-stop(100%,#008a00));\n",
- " background: -webkit-linear-gradient(top, #52b152 1%,#008a00 100%);\n",
- " background: -o-linear-gradient(top, #52b152 1%,#008a00 100%);\n",
- " background: -ms-linear-gradient(top, #52b152 1%,#008a00 100%);\n",
- " background: linear-gradient(to bottom, #52b152 1%,#008a00 100%);\n",
- " }\n",
- " div.nosebar.skip {\n",
- " background: #f1e767;\n",
- " background: -moz-linear-gradient(top, #f1e767 0%, #feb645 100%);\n",
- " background: -webkit-gradient(linear, left top, left bottom,\n",
- " color-stop(0%,#f1e767),\n",
- " color-stop(100%,#feb645));\n",
- " background: -webkit-linear-gradient(top, #f1e767 0%,#feb645 100%);\n",
- " background: -o-linear-gradient(top, #f1e767 0%,#feb645 100%);\n",
- " background: -ms-linear-gradient(top, #f1e767 0%,#feb645 100%);\n",
- " background: linear-gradient(to bottom, #f1e767 0%,#feb645 100%);\n",
- " }\n",
- " div.nosebar.leftmost {\n",
- " border-radius: 4px 0 0 4px;\n",
- " }\n",
- " div.nosebar.rightmost {\n",
- " border-radius: 0 4px 4px 0;\n",
- " }\n",
- " div.nosefailbanner {\n",
- " border-radius: 4px 0 0 4px;\n",
- " border-left: 10px solid #cf0404;\n",
- " padding: 0.5ex 0em 0.5ex 1em;\n",
- " margin-top: 1ex;\n",
- " margin-bottom: 0px;\n",
- " }\n",
- " div.nosefailbanner.expanded {\n",
- " border-radius: 4px 4px 0 0;\n",
- " border-top: 10px solid #cf0404;\n",
- " }\n",
- " pre.nosetraceback {\n",
- " border-radius: 0 4px 4px 4px;\n",
- " border-left: 10px solid #cf0404;\n",
- " padding: 1em;\n",
- " margin-left: 0px;\n",
- " margin-top: 0px;\n",
- " display: none;\n",
- " }\n",
- " </style>\n",
- " \n",
- " <script>\n",
- " setTimeout(function () {\n",
- " $('.nosefailtoggle').bind(\n",
- " 'click',\n",
- " function () {\n",
- " $(\n",
- " $(this)\n",
- " .parent().toggleClass('expanded')\n",
- " .parent()\n",
- " .children()\n",
- " .filter('.nosetraceback')\n",
- " ).toggle();\n",
- " }\n",
- " );},\n",
- " 0);\n",
- " </script>\n",
- " \n",
- " <div class=\"noseresults\">\n",
- " <div class=\"nosebar fail leftmost\" style=\"width: 66%\">\n",
- " \n",
- " </div>\n",
- " <div class=\"nosebar skip\" style=\"width: 0%\">\n",
- " \n",
- " </div>\n",
- " <div class=\"nosebar pass rightmost\" style=\"width: 34%\">\n",
- " \n",
- " </div>\n",
- " 1/3 tests passed; 2 failed\n",
- " </div>\n",
- " \n",
- " <div class=\"nosefailure\">\n",
- " <div class=\"nosefailbanner\">\n",
- " failed: <span class=\"nosefailedfunc\">__main__.test_mean_of_empty_function_raises_value_error</span>\n",
- " [<a class=\"nosefailtoggle\" href=\"#\">toggle traceback</a>]\n",
- " </div>\n",
- " <pre class=\"nosetraceback\">Traceback (most recent call last):\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/unittest/case.py\", line 331, in run\n",
- " testMethod()\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/site-packages/nose/case.py\", line 197, in runTest\n",
- " self.test(*self.arg)\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/site-packages/nose/tools/nontrivial.py\", line 60, in newfunc\n",
- " func(*arg, **kw)\n",
- " File \"<<a href=\"#ipython-input-2-bc417f346267\">ipython-input-2-bc417f346267</a><script>\n",
- " $(\"div.prompt.input_prompt:contains([2])\")\n",
- " .attr(\"id\", \"ipython-input-2-bc417f346267\");\n",
- " </script>>\", line 5, in test_mean_of_empty_function_raises_value_error\n",
- " mean([])\n",
- "NameError: global name 'mean' is not defined\n",
- "</pre>\n",
- " </div>\n",
- " \n",
- " <div class=\"nosefailure\">\n",
- " <div class=\"nosefailbanner\">\n",
- " failed: <span class=\"nosefailedfunc\">__main__.test_add_two_plus_two_equals_four</span>\n",
- " [<a class=\"nosefailtoggle\" href=\"#\">toggle traceback</a>]\n",
- " </div>\n",
- " <pre class=\"nosetraceback\">Traceback (most recent call last):\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/unittest/case.py\", line 331, in run\n",
- " testMethod()\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/site-packages/nose/case.py\", line 197, in runTest\n",
- " self.test(*self.arg)\n",
- " File \"<<a href=\"#ipython-input-15-2d797333ff4c\">ipython-input-15-2d797333ff4c</a><script>\n",
- " $(\"div.prompt.input_prompt:contains([15])\")\n",
- " .attr(\"id\", \"ipython-input-15-2d797333ff4c\");\n",
- " </script>>\", line 5, in test_add_two_plus_two_equals_four\n",
- " assert 4 == add_two_plus_two(), \"2 + 2 didn't equal 4\"\n",
- "AssertionError: 2 + 2 didn't equal 4\n",
- "</pre>\n",
- " </div>\n",
- " "
- ],
- "output_type": "pyout",
- "prompt_number": 18,
- "text": [
- "1/3 tests passed; 2 failed\n",
- "========\n",
- "__main__.test_mean_of_empty_function_raises_value_error\n",
- "========\n",
- "Traceback (most recent call last):\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/unittest/case.py\", line 331, in run\n",
- " testMethod()\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/site-packages/nose/case.py\", line 197, in runTest\n",
- " self.test(*self.arg)\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/site-packages/nose/tools/nontrivial.py\", line 60, in newfunc\n",
- " func(*arg, **kw)\n",
- " File \"<ipython-input-2-bc417f346267>\", line 5, in test_mean_of_empty_function_raises_value_error\n",
- " mean([])\n",
- "NameError: global name 'mean' is not defined\n",
- "\n",
- "========\n",
- "__main__.test_add_two_plus_two_equals_four\n",
- "========\n",
- "Traceback (most recent call last):\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/unittest/case.py\", line 331, in run\n",
- " testMethod()\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/site-packages/nose/case.py\", line 197, in runTest\n",
- " self.test(*self.arg)\n",
- " File \"<ipython-input-15-2d797333ff4c>\", line 5, in test_add_two_plus_two_equals_four\n",
- " assert 4 == add_two_plus_two(), \"2 + 2 didn't equal 4\"\n",
- "AssertionError: 2 + 2 didn't equal 4\n",
- "\n"
- ]
- }
- ],
- "prompt_number": 18
+ "outputs": []
},
{
"cell_type": "markdown",
],
"language": "python",
"metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "........\r\n",
- "----------------------------------------------------------------------\r\n",
- "Ran 8 tests in 0.004s\r\n",
- "\r\n",
- "OK\r\n"
- ]
- }
- ],
- "prompt_number": 19
+ "outputs": []
},
{
"cell_type": "markdown",
],
"language": "python",
"metadata": {},
- "outputs": [],
- "prompt_number": 20
+ "outputs": []
},
{
"cell_type": "code",
],
"language": "python",
"metadata": {},
- "outputs": [
- {
- "html": [
- "<div id=\"ipython_nose_510c086cad7b476795575f3b317d1255\"></div>"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_510c086cad7b476795575f3b317d1255 = $(\"#ipython_nose_510c086cad7b476795575f3b317d1255\");"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_510c086cad7b476795575f3b317d1255.append($(\"<span>.</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_510c086cad7b476795575f3b317d1255.append($(\"<span>E</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_510c086cad7b476795575f3b317d1255.append($(\"<span>.</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "delete document.ipython_nose_510c086cad7b476795575f3b317d1255;"
- ],
- "output_type": "display_data"
- },
- {
- "html": [
- " <style type=\"text/css\">\n",
- " span.nosefailedfunc {\n",
- " font-family: monospace;\n",
- " font-weight: bold;\n",
- " }\n",
- " div.noseresults {\n",
- " width: 100%;\n",
- " }\n",
- " div.nosebar {\n",
- " float: left;\n",
- " padding: 1ex 0px 1ex 0px;\n",
- " }\n",
- " div.nosebar.fail {\n",
- " background: #ff3019; /* Old browsers */\n",
- " /* FF3.6+ */\n",
- " background: -moz-linear-gradient(top, #ff3019 0%, #cf0404 100%);\n",
- " /* Chrome,Safari4+ */\n",
- " background: -webkit-gradient(linear, left top, left bottom,\n",
- " color-stop(0%,#ff3019),\n",
- " color-stop(100%,#cf0404));\n",
- " /* Chrome10+,Safari5.1+ */\n",
- " background: -webkit-linear-gradient(top, #ff3019 0%,#cf0404 100%);\n",
- " /* Opera 11.10+ */\n",
- " background: -o-linear-gradient(top, #ff3019 0%,#cf0404 100%);\n",
- " /* IE10+ */\n",
- " background: -ms-linear-gradient(top, #ff3019 0%,#cf0404 100%);\n",
- " /* W3C */\n",
- " background: linear-gradient(to bottom, #ff3019 0%,#cf0404 100%);\n",
- " }\n",
- " div.nosebar.pass {\n",
- " background: #52b152;\n",
- " background: -moz-linear-gradient(top, #52b152 1%, #008a00 100%);\n",
- " background: -webkit-gradient(linear, left top, left bottom,\n",
- " color-stop(1%,#52b152),\n",
- " color-stop(100%,#008a00));\n",
- " background: -webkit-linear-gradient(top, #52b152 1%,#008a00 100%);\n",
- " background: -o-linear-gradient(top, #52b152 1%,#008a00 100%);\n",
- " background: -ms-linear-gradient(top, #52b152 1%,#008a00 100%);\n",
- " background: linear-gradient(to bottom, #52b152 1%,#008a00 100%);\n",
- " }\n",
- " div.nosebar.skip {\n",
- " background: #f1e767;\n",
- " background: -moz-linear-gradient(top, #f1e767 0%, #feb645 100%);\n",
- " background: -webkit-gradient(linear, left top, left bottom,\n",
- " color-stop(0%,#f1e767),\n",
- " color-stop(100%,#feb645));\n",
- " background: -webkit-linear-gradient(top, #f1e767 0%,#feb645 100%);\n",
- " background: -o-linear-gradient(top, #f1e767 0%,#feb645 100%);\n",
- " background: -ms-linear-gradient(top, #f1e767 0%,#feb645 100%);\n",
- " background: linear-gradient(to bottom, #f1e767 0%,#feb645 100%);\n",
- " }\n",
- " div.nosebar.leftmost {\n",
- " border-radius: 4px 0 0 4px;\n",
- " }\n",
- " div.nosebar.rightmost {\n",
- " border-radius: 0 4px 4px 0;\n",
- " }\n",
- " div.nosefailbanner {\n",
- " border-radius: 4px 0 0 4px;\n",
- " border-left: 10px solid #cf0404;\n",
- " padding: 0.5ex 0em 0.5ex 1em;\n",
- " margin-top: 1ex;\n",
- " margin-bottom: 0px;\n",
- " }\n",
- " div.nosefailbanner.expanded {\n",
- " border-radius: 4px 4px 0 0;\n",
- " border-top: 10px solid #cf0404;\n",
- " }\n",
- " pre.nosetraceback {\n",
- " border-radius: 0 4px 4px 4px;\n",
- " border-left: 10px solid #cf0404;\n",
- " padding: 1em;\n",
- " margin-left: 0px;\n",
- " margin-top: 0px;\n",
- " display: none;\n",
- " }\n",
- " </style>\n",
- " \n",
- " <script>\n",
- " setTimeout(function () {\n",
- " $('.nosefailtoggle').bind(\n",
- " 'click',\n",
- " function () {\n",
- " $(\n",
- " $(this)\n",
- " .parent().toggleClass('expanded')\n",
- " .parent()\n",
- " .children()\n",
- " .filter('.nosetraceback')\n",
- " ).toggle();\n",
- " }\n",
- " );},\n",
- " 0);\n",
- " </script>\n",
- " \n",
- " <div class=\"noseresults\">\n",
- " <div class=\"nosebar fail leftmost\" style=\"width: 33%\">\n",
- " \n",
- " </div>\n",
- " <div class=\"nosebar skip\" style=\"width: 0%\">\n",
- " \n",
- " </div>\n",
- " <div class=\"nosebar pass rightmost\" style=\"width: 67%\">\n",
- " \n",
- " </div>\n",
- " 2/3 tests passed; 1 failed\n",
- " </div>\n",
- " \n",
- " <div class=\"nosefailure\">\n",
- " <div class=\"nosefailbanner\">\n",
- " failed: <span class=\"nosefailedfunc\">__main__.test_mean_of_empty_function_raises_value_error</span>\n",
- " [<a class=\"nosefailtoggle\" href=\"#\">toggle traceback</a>]\n",
- " </div>\n",
- " <pre class=\"nosetraceback\">Traceback (most recent call last):\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/unittest/case.py\", line 331, in run\n",
- " testMethod()\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/site-packages/nose/case.py\", line 197, in runTest\n",
- " self.test(*self.arg)\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/site-packages/nose/tools/nontrivial.py\", line 60, in newfunc\n",
- " func(*arg, **kw)\n",
- " File \"<<a href=\"#ipython-input-2-bc417f346267\">ipython-input-2-bc417f346267</a><script>\n",
- " $(\"div.prompt.input_prompt:contains([2])\")\n",
- " .attr(\"id\", \"ipython-input-2-bc417f346267\");\n",
- " </script>>\", line 5, in test_mean_of_empty_function_raises_value_error\n",
- " mean([])\n",
- "NameError: global name 'mean' is not defined\n",
- "</pre>\n",
- " </div>\n",
- " "
- ],
- "output_type": "pyout",
- "prompt_number": 21,
- "text": [
- "2/3 tests passed; 1 failed\n",
- "========\n",
- "__main__.test_mean_of_empty_function_raises_value_error\n",
- "========\n",
- "Traceback (most recent call last):\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/unittest/case.py\", line 331, in run\n",
- " testMethod()\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/site-packages/nose/case.py\", line 197, in runTest\n",
- " self.test(*self.arg)\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/site-packages/nose/tools/nontrivial.py\", line 60, in newfunc\n",
- " func(*arg, **kw)\n",
- " File \"<ipython-input-2-bc417f346267>\", line 5, in test_mean_of_empty_function_raises_value_error\n",
- " mean([])\n",
- "NameError: global name 'mean' is not defined\n",
- "\n"
- ]
- }
- ],
- "prompt_number": 21
+ "outputs": []
},
{
"cell_type": "markdown",
],
"language": "python",
"metadata": {},
- "outputs": [],
- "prompt_number": 22
+ "outputs": []
},
{
"cell_type": "markdown",
],
"language": "python",
"metadata": {},
- "outputs": [
- {
- "html": [
- "<div id=\"ipython_nose_880d0b5c63014ac78937ccad69cf89d2\"></div>"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_880d0b5c63014ac78937ccad69cf89d2 = $(\"#ipython_nose_880d0b5c63014ac78937ccad69cf89d2\");"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_880d0b5c63014ac78937ccad69cf89d2.append($(\"<span>E</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_880d0b5c63014ac78937ccad69cf89d2.append($(\"<span>.</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_880d0b5c63014ac78937ccad69cf89d2.append($(\"<span>E</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_880d0b5c63014ac78937ccad69cf89d2.append($(\"<span>.</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "delete document.ipython_nose_880d0b5c63014ac78937ccad69cf89d2;"
- ],
- "output_type": "display_data"
- },
- {
- "html": [
- " <style type=\"text/css\">\n",
- " span.nosefailedfunc {\n",
- " font-family: monospace;\n",
- " font-weight: bold;\n",
- " }\n",
- " div.noseresults {\n",
- " width: 100%;\n",
- " }\n",
- " div.nosebar {\n",
- " float: left;\n",
- " padding: 1ex 0px 1ex 0px;\n",
- " }\n",
- " div.nosebar.fail {\n",
- " background: #ff3019; /* Old browsers */\n",
- " /* FF3.6+ */\n",
- " background: -moz-linear-gradient(top, #ff3019 0%, #cf0404 100%);\n",
- " /* Chrome,Safari4+ */\n",
- " background: -webkit-gradient(linear, left top, left bottom,\n",
- " color-stop(0%,#ff3019),\n",
- " color-stop(100%,#cf0404));\n",
- " /* Chrome10+,Safari5.1+ */\n",
- " background: -webkit-linear-gradient(top, #ff3019 0%,#cf0404 100%);\n",
- " /* Opera 11.10+ */\n",
- " background: -o-linear-gradient(top, #ff3019 0%,#cf0404 100%);\n",
- " /* IE10+ */\n",
- " background: -ms-linear-gradient(top, #ff3019 0%,#cf0404 100%);\n",
- " /* W3C */\n",
- " background: linear-gradient(to bottom, #ff3019 0%,#cf0404 100%);\n",
- " }\n",
- " div.nosebar.pass {\n",
- " background: #52b152;\n",
- " background: -moz-linear-gradient(top, #52b152 1%, #008a00 100%);\n",
- " background: -webkit-gradient(linear, left top, left bottom,\n",
- " color-stop(1%,#52b152),\n",
- " color-stop(100%,#008a00));\n",
- " background: -webkit-linear-gradient(top, #52b152 1%,#008a00 100%);\n",
- " background: -o-linear-gradient(top, #52b152 1%,#008a00 100%);\n",
- " background: -ms-linear-gradient(top, #52b152 1%,#008a00 100%);\n",
- " background: linear-gradient(to bottom, #52b152 1%,#008a00 100%);\n",
- " }\n",
- " div.nosebar.skip {\n",
- " background: #f1e767;\n",
- " background: -moz-linear-gradient(top, #f1e767 0%, #feb645 100%);\n",
- " background: -webkit-gradient(linear, left top, left bottom,\n",
- " color-stop(0%,#f1e767),\n",
- " color-stop(100%,#feb645));\n",
- " background: -webkit-linear-gradient(top, #f1e767 0%,#feb645 100%);\n",
- " background: -o-linear-gradient(top, #f1e767 0%,#feb645 100%);\n",
- " background: -ms-linear-gradient(top, #f1e767 0%,#feb645 100%);\n",
- " background: linear-gradient(to bottom, #f1e767 0%,#feb645 100%);\n",
- " }\n",
- " div.nosebar.leftmost {\n",
- " border-radius: 4px 0 0 4px;\n",
- " }\n",
- " div.nosebar.rightmost {\n",
- " border-radius: 0 4px 4px 0;\n",
- " }\n",
- " div.nosefailbanner {\n",
- " border-radius: 4px 0 0 4px;\n",
- " border-left: 10px solid #cf0404;\n",
- " padding: 0.5ex 0em 0.5ex 1em;\n",
- " margin-top: 1ex;\n",
- " margin-bottom: 0px;\n",
- " }\n",
- " div.nosefailbanner.expanded {\n",
- " border-radius: 4px 4px 0 0;\n",
- " border-top: 10px solid #cf0404;\n",
- " }\n",
- " pre.nosetraceback {\n",
- " border-radius: 0 4px 4px 4px;\n",
- " border-left: 10px solid #cf0404;\n",
- " padding: 1em;\n",
- " margin-left: 0px;\n",
- " margin-top: 0px;\n",
- " display: none;\n",
- " }\n",
- " </style>\n",
- " \n",
- " <script>\n",
- " setTimeout(function () {\n",
- " $('.nosefailtoggle').bind(\n",
- " 'click',\n",
- " function () {\n",
- " $(\n",
- " $(this)\n",
- " .parent().toggleClass('expanded')\n",
- " .parent()\n",
- " .children()\n",
- " .filter('.nosetraceback')\n",
- " ).toggle();\n",
- " }\n",
- " );},\n",
- " 0);\n",
- " </script>\n",
- " \n",
- " <div class=\"noseresults\">\n",
- " <div class=\"nosebar fail leftmost\" style=\"width: 50%\">\n",
- " \n",
- " </div>\n",
- " <div class=\"nosebar skip\" style=\"width: 0%\">\n",
- " \n",
- " </div>\n",
- " <div class=\"nosebar pass rightmost\" style=\"width: 50%\">\n",
- " \n",
- " </div>\n",
- " 2/4 tests passed; 2 failed\n",
- " </div>\n",
- " \n",
- " <div class=\"nosefailure\">\n",
- " <div class=\"nosefailbanner\">\n",
- " failed: <span class=\"nosefailedfunc\">__main__.test_mean_of_zero_is_zero</span>\n",
- " [<a class=\"nosefailtoggle\" href=\"#\">toggle traceback</a>]\n",
- " </div>\n",
- " <pre class=\"nosetraceback\">Traceback (most recent call last):\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/unittest/case.py\", line 331, in run\n",
- " testMethod()\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/site-packages/nose/case.py\", line 197, in runTest\n",
- " self.test(*self.arg)\n",
- " File \"<<a href=\"#ipython-input-22-ee2ab148c1b0\">ipython-input-22-ee2ab148c1b0</a><script>\n",
- " $(\"div.prompt.input_prompt:contains([22])\")\n",
- " .attr(\"id\", \"ipython-input-22-ee2ab148c1b0\");\n",
- " </script>>\", line 2, in test_mean_of_zero_is_zero\n",
- " assert 0 == mean([0])\n",
- "NameError: global name 'mean' is not defined\n",
- "</pre>\n",
- " </div>\n",
- " \n",
- " <div class=\"nosefailure\">\n",
- " <div class=\"nosefailbanner\">\n",
- " failed: <span class=\"nosefailedfunc\">__main__.test_mean_of_empty_function_raises_value_error</span>\n",
- " [<a class=\"nosefailtoggle\" href=\"#\">toggle traceback</a>]\n",
- " </div>\n",
- " <pre class=\"nosetraceback\">Traceback (most recent call last):\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/unittest/case.py\", line 331, in run\n",
- " testMethod()\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/site-packages/nose/case.py\", line 197, in runTest\n",
- " self.test(*self.arg)\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/site-packages/nose/tools/nontrivial.py\", line 60, in newfunc\n",
- " func(*arg, **kw)\n",
- " File \"<<a href=\"#ipython-input-2-bc417f346267\">ipython-input-2-bc417f346267</a><script>\n",
- " $(\"div.prompt.input_prompt:contains([2])\")\n",
- " .attr(\"id\", \"ipython-input-2-bc417f346267\");\n",
- " </script>>\", line 5, in test_mean_of_empty_function_raises_value_error\n",
- " mean([])\n",
- "NameError: global name 'mean' is not defined\n",
- "</pre>\n",
- " </div>\n",
- " "
- ],
- "output_type": "pyout",
- "prompt_number": 23,
- "text": [
- "2/4 tests passed; 2 failed\n",
- "========\n",
- "__main__.test_mean_of_zero_is_zero\n",
- "========\n",
- "Traceback (most recent call last):\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/unittest/case.py\", line 331, in run\n",
- " testMethod()\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/site-packages/nose/case.py\", line 197, in runTest\n",
- " self.test(*self.arg)\n",
- " File \"<ipython-input-22-ee2ab148c1b0>\", line 2, in test_mean_of_zero_is_zero\n",
- " assert 0 == mean([0])\n",
- "NameError: global name 'mean' is not defined\n",
- "\n",
- "========\n",
- "__main__.test_mean_of_empty_function_raises_value_error\n",
- "========\n",
- "Traceback (most recent call last):\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/unittest/case.py\", line 331, in run\n",
- " testMethod()\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/site-packages/nose/case.py\", line 197, in runTest\n",
- " self.test(*self.arg)\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/site-packages/nose/tools/nontrivial.py\", line 60, in newfunc\n",
- " func(*arg, **kw)\n",
- " File \"<ipython-input-2-bc417f346267>\", line 5, in test_mean_of_empty_function_raises_value_error\n",
- " mean([])\n",
- "NameError: global name 'mean' is not defined\n",
- "\n"
- ]
- }
- ],
- "prompt_number": 23
+ "outputs": []
},
{
"cell_type": "code",
],
"language": "python",
"metadata": {},
- "outputs": [],
- "prompt_number": 24
+ "outputs": []
},
{
"cell_type": "code",
],
"language": "python",
"metadata": {},
- "outputs": [
- {
- "html": [
- "<div id=\"ipython_nose_c2735c7e3d0c4677b88a8a5cd4cdf4a9\"></div>"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_c2735c7e3d0c4677b88a8a5cd4cdf4a9 = $(\"#ipython_nose_c2735c7e3d0c4677b88a8a5cd4cdf4a9\");"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_c2735c7e3d0c4677b88a8a5cd4cdf4a9.append($(\"<span>E</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_c2735c7e3d0c4677b88a8a5cd4cdf4a9.append($(\"<span>.</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_c2735c7e3d0c4677b88a8a5cd4cdf4a9.append($(\"<span>E</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_c2735c7e3d0c4677b88a8a5cd4cdf4a9.append($(\"<span>.</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "delete document.ipython_nose_c2735c7e3d0c4677b88a8a5cd4cdf4a9;"
- ],
- "output_type": "display_data"
- },
- {
- "html": [
- " <style type=\"text/css\">\n",
- " span.nosefailedfunc {\n",
- " font-family: monospace;\n",
- " font-weight: bold;\n",
- " }\n",
- " div.noseresults {\n",
- " width: 100%;\n",
- " }\n",
- " div.nosebar {\n",
- " float: left;\n",
- " padding: 1ex 0px 1ex 0px;\n",
- " }\n",
- " div.nosebar.fail {\n",
- " background: #ff3019; /* Old browsers */\n",
- " /* FF3.6+ */\n",
- " background: -moz-linear-gradient(top, #ff3019 0%, #cf0404 100%);\n",
- " /* Chrome,Safari4+ */\n",
- " background: -webkit-gradient(linear, left top, left bottom,\n",
- " color-stop(0%,#ff3019),\n",
- " color-stop(100%,#cf0404));\n",
- " /* Chrome10+,Safari5.1+ */\n",
- " background: -webkit-linear-gradient(top, #ff3019 0%,#cf0404 100%);\n",
- " /* Opera 11.10+ */\n",
- " background: -o-linear-gradient(top, #ff3019 0%,#cf0404 100%);\n",
- " /* IE10+ */\n",
- " background: -ms-linear-gradient(top, #ff3019 0%,#cf0404 100%);\n",
- " /* W3C */\n",
- " background: linear-gradient(to bottom, #ff3019 0%,#cf0404 100%);\n",
- " }\n",
- " div.nosebar.pass {\n",
- " background: #52b152;\n",
- " background: -moz-linear-gradient(top, #52b152 1%, #008a00 100%);\n",
- " background: -webkit-gradient(linear, left top, left bottom,\n",
- " color-stop(1%,#52b152),\n",
- " color-stop(100%,#008a00));\n",
- " background: -webkit-linear-gradient(top, #52b152 1%,#008a00 100%);\n",
- " background: -o-linear-gradient(top, #52b152 1%,#008a00 100%);\n",
- " background: -ms-linear-gradient(top, #52b152 1%,#008a00 100%);\n",
- " background: linear-gradient(to bottom, #52b152 1%,#008a00 100%);\n",
- " }\n",
- " div.nosebar.skip {\n",
- " background: #f1e767;\n",
- " background: -moz-linear-gradient(top, #f1e767 0%, #feb645 100%);\n",
- " background: -webkit-gradient(linear, left top, left bottom,\n",
- " color-stop(0%,#f1e767),\n",
- " color-stop(100%,#feb645));\n",
- " background: -webkit-linear-gradient(top, #f1e767 0%,#feb645 100%);\n",
- " background: -o-linear-gradient(top, #f1e767 0%,#feb645 100%);\n",
- " background: -ms-linear-gradient(top, #f1e767 0%,#feb645 100%);\n",
- " background: linear-gradient(to bottom, #f1e767 0%,#feb645 100%);\n",
- " }\n",
- " div.nosebar.leftmost {\n",
- " border-radius: 4px 0 0 4px;\n",
- " }\n",
- " div.nosebar.rightmost {\n",
- " border-radius: 0 4px 4px 0;\n",
- " }\n",
- " div.nosefailbanner {\n",
- " border-radius: 4px 0 0 4px;\n",
- " border-left: 10px solid #cf0404;\n",
- " padding: 0.5ex 0em 0.5ex 1em;\n",
- " margin-top: 1ex;\n",
- " margin-bottom: 0px;\n",
- " }\n",
- " div.nosefailbanner.expanded {\n",
- " border-radius: 4px 4px 0 0;\n",
- " border-top: 10px solid #cf0404;\n",
- " }\n",
- " pre.nosetraceback {\n",
- " border-radius: 0 4px 4px 4px;\n",
- " border-left: 10px solid #cf0404;\n",
- " padding: 1em;\n",
- " margin-left: 0px;\n",
- " margin-top: 0px;\n",
- " display: none;\n",
- " }\n",
- " </style>\n",
- " \n",
- " <script>\n",
- " setTimeout(function () {\n",
- " $('.nosefailtoggle').bind(\n",
- " 'click',\n",
- " function () {\n",
- " $(\n",
- " $(this)\n",
- " .parent().toggleClass('expanded')\n",
- " .parent()\n",
- " .children()\n",
- " .filter('.nosetraceback')\n",
- " ).toggle();\n",
- " }\n",
- " );},\n",
- " 0);\n",
- " </script>\n",
- " \n",
- " <div class=\"noseresults\">\n",
- " <div class=\"nosebar fail leftmost\" style=\"width: 50%\">\n",
- " \n",
- " </div>\n",
- " <div class=\"nosebar skip\" style=\"width: 0%\">\n",
- " \n",
- " </div>\n",
- " <div class=\"nosebar pass rightmost\" style=\"width: 50%\">\n",
- " \n",
- " </div>\n",
- " 2/4 tests passed; 2 failed\n",
- " </div>\n",
- " \n",
- " <div class=\"nosefailure\">\n",
- " <div class=\"nosefailbanner\">\n",
- " failed: <span class=\"nosefailedfunc\">__main__.test_mean_of_zero_is_zero</span>\n",
- " [<a class=\"nosefailtoggle\" href=\"#\">toggle traceback</a>]\n",
- " </div>\n",
- " <pre class=\"nosetraceback\">Traceback (most recent call last):\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/unittest/case.py\", line 331, in run\n",
- " testMethod()\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/site-packages/nose/case.py\", line 197, in runTest\n",
- " self.test(*self.arg)\n",
- " File \"<<a href=\"#ipython-input-22-ee2ab148c1b0\">ipython-input-22-ee2ab148c1b0</a><script>\n",
- " $(\"div.prompt.input_prompt:contains([22])\")\n",
- " .attr(\"id\", \"ipython-input-22-ee2ab148c1b0\");\n",
- " </script>>\", line 2, in test_mean_of_zero_is_zero\n",
- " assert 0 == mean([0])\n",
- "TypeError: mean() takes no arguments (1 given)\n",
- "</pre>\n",
- " </div>\n",
- " \n",
- " <div class=\"nosefailure\">\n",
- " <div class=\"nosefailbanner\">\n",
- " failed: <span class=\"nosefailedfunc\">__main__.test_mean_of_empty_function_raises_value_error</span>\n",
- " [<a class=\"nosefailtoggle\" href=\"#\">toggle traceback</a>]\n",
- " </div>\n",
- " <pre class=\"nosetraceback\">Traceback (most recent call last):\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/unittest/case.py\", line 331, in run\n",
- " testMethod()\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/site-packages/nose/case.py\", line 197, in runTest\n",
- " self.test(*self.arg)\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/site-packages/nose/tools/nontrivial.py\", line 60, in newfunc\n",
- " func(*arg, **kw)\n",
- " File \"<<a href=\"#ipython-input-2-bc417f346267\">ipython-input-2-bc417f346267</a><script>\n",
- " $(\"div.prompt.input_prompt:contains([2])\")\n",
- " .attr(\"id\", \"ipython-input-2-bc417f346267\");\n",
- " </script>>\", line 5, in test_mean_of_empty_function_raises_value_error\n",
- " mean([])\n",
- "TypeError: mean() takes no arguments (1 given)\n",
- "</pre>\n",
- " </div>\n",
- " "
- ],
- "output_type": "pyout",
- "prompt_number": 25,
- "text": [
- "2/4 tests passed; 2 failed\n",
- "========\n",
- "__main__.test_mean_of_zero_is_zero\n",
- "========\n",
- "Traceback (most recent call last):\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/unittest/case.py\", line 331, in run\n",
- " testMethod()\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/site-packages/nose/case.py\", line 197, in runTest\n",
- " self.test(*self.arg)\n",
- " File \"<ipython-input-22-ee2ab148c1b0>\", line 2, in test_mean_of_zero_is_zero\n",
- " assert 0 == mean([0])\n",
- "TypeError: mean() takes no arguments (1 given)\n",
- "\n",
- "========\n",
- "__main__.test_mean_of_empty_function_raises_value_error\n",
- "========\n",
- "Traceback (most recent call last):\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/unittest/case.py\", line 331, in run\n",
- " testMethod()\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/site-packages/nose/case.py\", line 197, in runTest\n",
- " self.test(*self.arg)\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/site-packages/nose/tools/nontrivial.py\", line 60, in newfunc\n",
- " func(*arg, **kw)\n",
- " File \"<ipython-input-2-bc417f346267>\", line 5, in test_mean_of_empty_function_raises_value_error\n",
- " mean([])\n",
- "TypeError: mean() takes no arguments (1 given)\n",
- "\n"
- ]
- }
- ],
- "prompt_number": 25
+ "outputs": []
},
{
"cell_type": "code",
],
"language": "python",
"metadata": {},
- "outputs": [],
- "prompt_number": 26
+ "outputs": []
},
{
"cell_type": "code",
],
"language": "python",
"metadata": {},
- "outputs": [
- {
- "html": [
- "<div id=\"ipython_nose_1e1bd17442294222a80f6cc462ac3176\"></div>"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_1e1bd17442294222a80f6cc462ac3176 = $(\"#ipython_nose_1e1bd17442294222a80f6cc462ac3176\");"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_1e1bd17442294222a80f6cc462ac3176.append($(\"<span>F</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_1e1bd17442294222a80f6cc462ac3176.append($(\"<span>.</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_1e1bd17442294222a80f6cc462ac3176.append($(\"<span>F</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_1e1bd17442294222a80f6cc462ac3176.append($(\"<span>.</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "delete document.ipython_nose_1e1bd17442294222a80f6cc462ac3176;"
- ],
- "output_type": "display_data"
- },
- {
- "html": [
- " <style type=\"text/css\">\n",
- " span.nosefailedfunc {\n",
- " font-family: monospace;\n",
- " font-weight: bold;\n",
- " }\n",
- " div.noseresults {\n",
- " width: 100%;\n",
- " }\n",
- " div.nosebar {\n",
- " float: left;\n",
- " padding: 1ex 0px 1ex 0px;\n",
- " }\n",
- " div.nosebar.fail {\n",
- " background: #ff3019; /* Old browsers */\n",
- " /* FF3.6+ */\n",
- " background: -moz-linear-gradient(top, #ff3019 0%, #cf0404 100%);\n",
- " /* Chrome,Safari4+ */\n",
- " background: -webkit-gradient(linear, left top, left bottom,\n",
- " color-stop(0%,#ff3019),\n",
- " color-stop(100%,#cf0404));\n",
- " /* Chrome10+,Safari5.1+ */\n",
- " background: -webkit-linear-gradient(top, #ff3019 0%,#cf0404 100%);\n",
- " /* Opera 11.10+ */\n",
- " background: -o-linear-gradient(top, #ff3019 0%,#cf0404 100%);\n",
- " /* IE10+ */\n",
- " background: -ms-linear-gradient(top, #ff3019 0%,#cf0404 100%);\n",
- " /* W3C */\n",
- " background: linear-gradient(to bottom, #ff3019 0%,#cf0404 100%);\n",
- " }\n",
- " div.nosebar.pass {\n",
- " background: #52b152;\n",
- " background: -moz-linear-gradient(top, #52b152 1%, #008a00 100%);\n",
- " background: -webkit-gradient(linear, left top, left bottom,\n",
- " color-stop(1%,#52b152),\n",
- " color-stop(100%,#008a00));\n",
- " background: -webkit-linear-gradient(top, #52b152 1%,#008a00 100%);\n",
- " background: -o-linear-gradient(top, #52b152 1%,#008a00 100%);\n",
- " background: -ms-linear-gradient(top, #52b152 1%,#008a00 100%);\n",
- " background: linear-gradient(to bottom, #52b152 1%,#008a00 100%);\n",
- " }\n",
- " div.nosebar.skip {\n",
- " background: #f1e767;\n",
- " background: -moz-linear-gradient(top, #f1e767 0%, #feb645 100%);\n",
- " background: -webkit-gradient(linear, left top, left bottom,\n",
- " color-stop(0%,#f1e767),\n",
- " color-stop(100%,#feb645));\n",
- " background: -webkit-linear-gradient(top, #f1e767 0%,#feb645 100%);\n",
- " background: -o-linear-gradient(top, #f1e767 0%,#feb645 100%);\n",
- " background: -ms-linear-gradient(top, #f1e767 0%,#feb645 100%);\n",
- " background: linear-gradient(to bottom, #f1e767 0%,#feb645 100%);\n",
- " }\n",
- " div.nosebar.leftmost {\n",
- " border-radius: 4px 0 0 4px;\n",
- " }\n",
- " div.nosebar.rightmost {\n",
- " border-radius: 0 4px 4px 0;\n",
- " }\n",
- " div.nosefailbanner {\n",
- " border-radius: 4px 0 0 4px;\n",
- " border-left: 10px solid #cf0404;\n",
- " padding: 0.5ex 0em 0.5ex 1em;\n",
- " margin-top: 1ex;\n",
- " margin-bottom: 0px;\n",
- " }\n",
- " div.nosefailbanner.expanded {\n",
- " border-radius: 4px 4px 0 0;\n",
- " border-top: 10px solid #cf0404;\n",
- " }\n",
- " pre.nosetraceback {\n",
- " border-radius: 0 4px 4px 4px;\n",
- " border-left: 10px solid #cf0404;\n",
- " padding: 1em;\n",
- " margin-left: 0px;\n",
- " margin-top: 0px;\n",
- " display: none;\n",
- " }\n",
- " </style>\n",
- " \n",
- " <script>\n",
- " setTimeout(function () {\n",
- " $('.nosefailtoggle').bind(\n",
- " 'click',\n",
- " function () {\n",
- " $(\n",
- " $(this)\n",
- " .parent().toggleClass('expanded')\n",
- " .parent()\n",
- " .children()\n",
- " .filter('.nosetraceback')\n",
- " ).toggle();\n",
- " }\n",
- " );},\n",
- " 0);\n",
- " </script>\n",
- " \n",
- " <div class=\"noseresults\">\n",
- " <div class=\"nosebar fail leftmost\" style=\"width: 50%\">\n",
- " \n",
- " </div>\n",
- " <div class=\"nosebar skip\" style=\"width: 0%\">\n",
- " \n",
- " </div>\n",
- " <div class=\"nosebar pass rightmost\" style=\"width: 50%\">\n",
- " \n",
- " </div>\n",
- " 2/4 tests passed; 2 failed\n",
- " </div>\n",
- " \n",
- " <div class=\"nosefailure\">\n",
- " <div class=\"nosefailbanner\">\n",
- " failed: <span class=\"nosefailedfunc\">__main__.test_mean_of_zero_is_zero</span>\n",
- " [<a class=\"nosefailtoggle\" href=\"#\">toggle traceback</a>]\n",
- " </div>\n",
- " <pre class=\"nosetraceback\">Traceback (most recent call last):\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/unittest/case.py\", line 331, in run\n",
- " testMethod()\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/site-packages/nose/case.py\", line 197, in runTest\n",
- " self.test(*self.arg)\n",
- " File \"<<a href=\"#ipython-input-22-ee2ab148c1b0\">ipython-input-22-ee2ab148c1b0</a><script>\n",
- " $(\"div.prompt.input_prompt:contains([22])\")\n",
- " .attr(\"id\", \"ipython-input-22-ee2ab148c1b0\");\n",
- " </script>>\", line 2, in test_mean_of_zero_is_zero\n",
- " assert 0 == mean([0])\n",
- "AssertionError\n",
- "</pre>\n",
- " </div>\n",
- " \n",
- " <div class=\"nosefailure\">\n",
- " <div class=\"nosefailbanner\">\n",
- " failed: <span class=\"nosefailedfunc\">__main__.test_mean_of_empty_function_raises_value_error</span>\n",
- " [<a class=\"nosefailtoggle\" href=\"#\">toggle traceback</a>]\n",
- " </div>\n",
- " <pre class=\"nosetraceback\">Traceback (most recent call last):\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/unittest/case.py\", line 331, in run\n",
- " testMethod()\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/site-packages/nose/case.py\", line 197, in runTest\n",
- " self.test(*self.arg)\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/site-packages/nose/tools/nontrivial.py\", line 67, in newfunc\n",
- " raise AssertionError(message)\n",
- "AssertionError: test_mean_of_empty_function_raises_value_error() did not raise ValueError\n",
- "</pre>\n",
- " </div>\n",
- " "
- ],
- "output_type": "pyout",
- "prompt_number": 27,
- "text": [
- "2/4 tests passed; 2 failed\n",
- "========\n",
- "__main__.test_mean_of_zero_is_zero\n",
- "========\n",
- "Traceback (most recent call last):\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/unittest/case.py\", line 331, in run\n",
- " testMethod()\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/site-packages/nose/case.py\", line 197, in runTest\n",
- " self.test(*self.arg)\n",
- " File \"<ipython-input-22-ee2ab148c1b0>\", line 2, in test_mean_of_zero_is_zero\n",
- " assert 0 == mean([0])\n",
- "AssertionError\n",
- "\n",
- "========\n",
- "__main__.test_mean_of_empty_function_raises_value_error\n",
- "========\n",
- "Traceback (most recent call last):\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/unittest/case.py\", line 331, in run\n",
- " testMethod()\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/site-packages/nose/case.py\", line 197, in runTest\n",
- " self.test(*self.arg)\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/site-packages/nose/tools/nontrivial.py\", line 67, in newfunc\n",
- " raise AssertionError(message)\n",
- "AssertionError: test_mean_of_empty_function_raises_value_error() did not raise ValueError\n",
- "\n"
- ]
- }
- ],
- "prompt_number": 27
+ "outputs": []
},
{
"cell_type": "code",
],
"language": "python",
"metadata": {},
- "outputs": [],
- "prompt_number": 28
+ "outputs": []
},
{
"cell_type": "code",
],
"language": "python",
"metadata": {},
- "outputs": [
- {
- "html": [
- "<div id=\"ipython_nose_fe9e7f6480d54f919bfa6edad2ce0493\"></div>"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_fe9e7f6480d54f919bfa6edad2ce0493 = $(\"#ipython_nose_fe9e7f6480d54f919bfa6edad2ce0493\");"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_fe9e7f6480d54f919bfa6edad2ce0493.append($(\"<span>.</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_fe9e7f6480d54f919bfa6edad2ce0493.append($(\"<span>.</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_fe9e7f6480d54f919bfa6edad2ce0493.append($(\"<span>F</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_fe9e7f6480d54f919bfa6edad2ce0493.append($(\"<span>.</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "delete document.ipython_nose_fe9e7f6480d54f919bfa6edad2ce0493;"
- ],
- "output_type": "display_data"
- },
- {
- "html": [
- " <style type=\"text/css\">\n",
- " span.nosefailedfunc {\n",
- " font-family: monospace;\n",
- " font-weight: bold;\n",
- " }\n",
- " div.noseresults {\n",
- " width: 100%;\n",
- " }\n",
- " div.nosebar {\n",
- " float: left;\n",
- " padding: 1ex 0px 1ex 0px;\n",
- " }\n",
- " div.nosebar.fail {\n",
- " background: #ff3019; /* Old browsers */\n",
- " /* FF3.6+ */\n",
- " background: -moz-linear-gradient(top, #ff3019 0%, #cf0404 100%);\n",
- " /* Chrome,Safari4+ */\n",
- " background: -webkit-gradient(linear, left top, left bottom,\n",
- " color-stop(0%,#ff3019),\n",
- " color-stop(100%,#cf0404));\n",
- " /* Chrome10+,Safari5.1+ */\n",
- " background: -webkit-linear-gradient(top, #ff3019 0%,#cf0404 100%);\n",
- " /* Opera 11.10+ */\n",
- " background: -o-linear-gradient(top, #ff3019 0%,#cf0404 100%);\n",
- " /* IE10+ */\n",
- " background: -ms-linear-gradient(top, #ff3019 0%,#cf0404 100%);\n",
- " /* W3C */\n",
- " background: linear-gradient(to bottom, #ff3019 0%,#cf0404 100%);\n",
- " }\n",
- " div.nosebar.pass {\n",
- " background: #52b152;\n",
- " background: -moz-linear-gradient(top, #52b152 1%, #008a00 100%);\n",
- " background: -webkit-gradient(linear, left top, left bottom,\n",
- " color-stop(1%,#52b152),\n",
- " color-stop(100%,#008a00));\n",
- " background: -webkit-linear-gradient(top, #52b152 1%,#008a00 100%);\n",
- " background: -o-linear-gradient(top, #52b152 1%,#008a00 100%);\n",
- " background: -ms-linear-gradient(top, #52b152 1%,#008a00 100%);\n",
- " background: linear-gradient(to bottom, #52b152 1%,#008a00 100%);\n",
- " }\n",
- " div.nosebar.skip {\n",
- " background: #f1e767;\n",
- " background: -moz-linear-gradient(top, #f1e767 0%, #feb645 100%);\n",
- " background: -webkit-gradient(linear, left top, left bottom,\n",
- " color-stop(0%,#f1e767),\n",
- " color-stop(100%,#feb645));\n",
- " background: -webkit-linear-gradient(top, #f1e767 0%,#feb645 100%);\n",
- " background: -o-linear-gradient(top, #f1e767 0%,#feb645 100%);\n",
- " background: -ms-linear-gradient(top, #f1e767 0%,#feb645 100%);\n",
- " background: linear-gradient(to bottom, #f1e767 0%,#feb645 100%);\n",
- " }\n",
- " div.nosebar.leftmost {\n",
- " border-radius: 4px 0 0 4px;\n",
- " }\n",
- " div.nosebar.rightmost {\n",
- " border-radius: 0 4px 4px 0;\n",
- " }\n",
- " div.nosefailbanner {\n",
- " border-radius: 4px 0 0 4px;\n",
- " border-left: 10px solid #cf0404;\n",
- " padding: 0.5ex 0em 0.5ex 1em;\n",
- " margin-top: 1ex;\n",
- " margin-bottom: 0px;\n",
- " }\n",
- " div.nosefailbanner.expanded {\n",
- " border-radius: 4px 4px 0 0;\n",
- " border-top: 10px solid #cf0404;\n",
- " }\n",
- " pre.nosetraceback {\n",
- " border-radius: 0 4px 4px 4px;\n",
- " border-left: 10px solid #cf0404;\n",
- " padding: 1em;\n",
- " margin-left: 0px;\n",
- " margin-top: 0px;\n",
- " display: none;\n",
- " }\n",
- " </style>\n",
- " \n",
- " <script>\n",
- " setTimeout(function () {\n",
- " $('.nosefailtoggle').bind(\n",
- " 'click',\n",
- " function () {\n",
- " $(\n",
- " $(this)\n",
- " .parent().toggleClass('expanded')\n",
- " .parent()\n",
- " .children()\n",
- " .filter('.nosetraceback')\n",
- " ).toggle();\n",
- " }\n",
- " );},\n",
- " 0);\n",
- " </script>\n",
- " \n",
- " <div class=\"noseresults\">\n",
- " <div class=\"nosebar fail leftmost\" style=\"width: 25%\">\n",
- " \n",
- " </div>\n",
- " <div class=\"nosebar skip\" style=\"width: 0%\">\n",
- " \n",
- " </div>\n",
- " <div class=\"nosebar pass rightmost\" style=\"width: 75%\">\n",
- " \n",
- " </div>\n",
- " 3/4 tests passed; 1 failed\n",
- " </div>\n",
- " \n",
- " <div class=\"nosefailure\">\n",
- " <div class=\"nosefailbanner\">\n",
- " failed: <span class=\"nosefailedfunc\">__main__.test_mean_of_empty_function_raises_value_error</span>\n",
- " [<a class=\"nosefailtoggle\" href=\"#\">toggle traceback</a>]\n",
- " </div>\n",
- " <pre class=\"nosetraceback\">Traceback (most recent call last):\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/unittest/case.py\", line 331, in run\n",
- " testMethod()\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/site-packages/nose/case.py\", line 197, in runTest\n",
- " self.test(*self.arg)\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/site-packages/nose/tools/nontrivial.py\", line 67, in newfunc\n",
- " raise AssertionError(message)\n",
- "AssertionError: test_mean_of_empty_function_raises_value_error() did not raise ValueError\n",
- "</pre>\n",
- " </div>\n",
- " "
- ],
- "output_type": "pyout",
- "prompt_number": 29,
- "text": [
- "3/4 tests passed; 1 failed\n",
- "========\n",
- "__main__.test_mean_of_empty_function_raises_value_error\n",
- "========\n",
- "Traceback (most recent call last):\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/unittest/case.py\", line 331, in run\n",
- " testMethod()\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/site-packages/nose/case.py\", line 197, in runTest\n",
- " self.test(*self.arg)\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/site-packages/nose/tools/nontrivial.py\", line 67, in newfunc\n",
- " raise AssertionError(message)\n",
- "AssertionError: test_mean_of_empty_function_raises_value_error() did not raise ValueError\n",
- "\n"
- ]
- }
- ],
- "prompt_number": 29
+ "outputs": []
},
{
"cell_type": "markdown",
],
"language": "python",
"metadata": {},
- "outputs": [],
- "prompt_number": 30
+ "outputs": []
},
{
"cell_type": "markdown",
],
"language": "python",
"metadata": {},
- "outputs": [
- {
- "output_type": "pyout",
- "prompt_number": 31,
- "text": [
- "0.0"
- ]
- }
- ],
- "prompt_number": 31
+ "outputs": []
},
{
"cell_type": "code",
],
"language": "python",
"metadata": {},
- "outputs": [
- {
- "output_type": "pyout",
- "prompt_number": 32,
- "text": [
- "1.0"
- ]
- }
- ],
- "prompt_number": 32
+ "outputs": []
},
{
"cell_type": "code",
],
"language": "python",
"metadata": {},
- "outputs": [
- {
- "output_type": "pyout",
- "prompt_number": 33,
- "text": [
- "3.0"
- ]
- }
- ],
- "prompt_number": 33
+ "outputs": []
},
{
"cell_type": "code",
],
"language": "python",
"metadata": {},
- "outputs": [
- {
- "output_type": "pyout",
- "prompt_number": 34,
- "text": [
- "4.566666666666666"
- ]
- }
- ],
- "prompt_number": 34
+ "outputs": []
},
{
"cell_type": "code",
],
"language": "python",
"metadata": {},
- "outputs": [
- {
- "ename": "ZeroDivisionError",
- "evalue": "float division by zero",
- "output_type": "pyerr",
- "traceback": [
- "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[0;31mZeroDivisionError\u001b[0m Traceback (most recent call last)",
- "\u001b[0;32m<ipython-input-35-e9e2222d800d>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mmean\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
- "\u001b[0;32m<ipython-input-30-16ccb79ef6d8>\u001b[0m in \u001b[0;36mmean\u001b[0;34m(numbers)\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0;32mfor\u001b[0m \u001b[0mnumber\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mnumbers\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0mtotal\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mtotal\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0mnumber\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 6\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mtotal\u001b[0m\u001b[0;34m/\u001b[0m\u001b[0mfloat\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mnumbers\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
- "\u001b[0;31mZeroDivisionError\u001b[0m: float division by zero"
- ]
- }
- ],
- "prompt_number": 35
+ "outputs": []
},
{
"cell_type": "markdown",
],
"language": "python",
"metadata": {},
- "outputs": [],
- "prompt_number": 36
+ "outputs": []
},
{
"cell_type": "code",
],
"language": "python",
"metadata": {},
- "outputs": [
- {
- "html": [
- "<div id=\"ipython_nose_5ceb566dc2db4a1cbddaa43327f83fab\"></div>"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_5ceb566dc2db4a1cbddaa43327f83fab = $(\"#ipython_nose_5ceb566dc2db4a1cbddaa43327f83fab\");"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_5ceb566dc2db4a1cbddaa43327f83fab.append($(\"<span>.</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_5ceb566dc2db4a1cbddaa43327f83fab.append($(\"<span>.</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_5ceb566dc2db4a1cbddaa43327f83fab.append($(\"<span>E</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_5ceb566dc2db4a1cbddaa43327f83fab.append($(\"<span>.</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "delete document.ipython_nose_5ceb566dc2db4a1cbddaa43327f83fab;"
- ],
- "output_type": "display_data"
- },
- {
- "html": [
- " <style type=\"text/css\">\n",
- " span.nosefailedfunc {\n",
- " font-family: monospace;\n",
- " font-weight: bold;\n",
- " }\n",
- " div.noseresults {\n",
- " width: 100%;\n",
- " }\n",
- " div.nosebar {\n",
- " float: left;\n",
- " padding: 1ex 0px 1ex 0px;\n",
- " }\n",
- " div.nosebar.fail {\n",
- " background: #ff3019; /* Old browsers */\n",
- " /* FF3.6+ */\n",
- " background: -moz-linear-gradient(top, #ff3019 0%, #cf0404 100%);\n",
- " /* Chrome,Safari4+ */\n",
- " background: -webkit-gradient(linear, left top, left bottom,\n",
- " color-stop(0%,#ff3019),\n",
- " color-stop(100%,#cf0404));\n",
- " /* Chrome10+,Safari5.1+ */\n",
- " background: -webkit-linear-gradient(top, #ff3019 0%,#cf0404 100%);\n",
- " /* Opera 11.10+ */\n",
- " background: -o-linear-gradient(top, #ff3019 0%,#cf0404 100%);\n",
- " /* IE10+ */\n",
- " background: -ms-linear-gradient(top, #ff3019 0%,#cf0404 100%);\n",
- " /* W3C */\n",
- " background: linear-gradient(to bottom, #ff3019 0%,#cf0404 100%);\n",
- " }\n",
- " div.nosebar.pass {\n",
- " background: #52b152;\n",
- " background: -moz-linear-gradient(top, #52b152 1%, #008a00 100%);\n",
- " background: -webkit-gradient(linear, left top, left bottom,\n",
- " color-stop(1%,#52b152),\n",
- " color-stop(100%,#008a00));\n",
- " background: -webkit-linear-gradient(top, #52b152 1%,#008a00 100%);\n",
- " background: -o-linear-gradient(top, #52b152 1%,#008a00 100%);\n",
- " background: -ms-linear-gradient(top, #52b152 1%,#008a00 100%);\n",
- " background: linear-gradient(to bottom, #52b152 1%,#008a00 100%);\n",
- " }\n",
- " div.nosebar.skip {\n",
- " background: #f1e767;\n",
- " background: -moz-linear-gradient(top, #f1e767 0%, #feb645 100%);\n",
- " background: -webkit-gradient(linear, left top, left bottom,\n",
- " color-stop(0%,#f1e767),\n",
- " color-stop(100%,#feb645));\n",
- " background: -webkit-linear-gradient(top, #f1e767 0%,#feb645 100%);\n",
- " background: -o-linear-gradient(top, #f1e767 0%,#feb645 100%);\n",
- " background: -ms-linear-gradient(top, #f1e767 0%,#feb645 100%);\n",
- " background: linear-gradient(to bottom, #f1e767 0%,#feb645 100%);\n",
- " }\n",
- " div.nosebar.leftmost {\n",
- " border-radius: 4px 0 0 4px;\n",
- " }\n",
- " div.nosebar.rightmost {\n",
- " border-radius: 0 4px 4px 0;\n",
- " }\n",
- " div.nosefailbanner {\n",
- " border-radius: 4px 0 0 4px;\n",
- " border-left: 10px solid #cf0404;\n",
- " padding: 0.5ex 0em 0.5ex 1em;\n",
- " margin-top: 1ex;\n",
- " margin-bottom: 0px;\n",
- " }\n",
- " div.nosefailbanner.expanded {\n",
- " border-radius: 4px 4px 0 0;\n",
- " border-top: 10px solid #cf0404;\n",
- " }\n",
- " pre.nosetraceback {\n",
- " border-radius: 0 4px 4px 4px;\n",
- " border-left: 10px solid #cf0404;\n",
- " padding: 1em;\n",
- " margin-left: 0px;\n",
- " margin-top: 0px;\n",
- " display: none;\n",
- " }\n",
- " </style>\n",
- " \n",
- " <script>\n",
- " setTimeout(function () {\n",
- " $('.nosefailtoggle').bind(\n",
- " 'click',\n",
- " function () {\n",
- " $(\n",
- " $(this)\n",
- " .parent().toggleClass('expanded')\n",
- " .parent()\n",
- " .children()\n",
- " .filter('.nosetraceback')\n",
- " ).toggle();\n",
- " }\n",
- " );},\n",
- " 0);\n",
- " </script>\n",
- " \n",
- " <div class=\"noseresults\">\n",
- " <div class=\"nosebar fail leftmost\" style=\"width: 25%\">\n",
- " \n",
- " </div>\n",
- " <div class=\"nosebar skip\" style=\"width: 0%\">\n",
- " \n",
- " </div>\n",
- " <div class=\"nosebar pass rightmost\" style=\"width: 75%\">\n",
- " \n",
- " </div>\n",
- " 3/4 tests passed; 1 failed\n",
- " </div>\n",
- " \n",
- " <div class=\"nosefailure\">\n",
- " <div class=\"nosefailbanner\">\n",
- " failed: <span class=\"nosefailedfunc\">__main__.test_mean_of_empty_function_raises_value_error</span>\n",
- " [<a class=\"nosefailtoggle\" href=\"#\">toggle traceback</a>]\n",
- " </div>\n",
- " <pre class=\"nosetraceback\">Traceback (most recent call last):\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/unittest/case.py\", line 331, in run\n",
- " testMethod()\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/site-packages/nose/case.py\", line 197, in runTest\n",
- " self.test(*self.arg)\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/site-packages/nose/tools/nontrivial.py\", line 60, in newfunc\n",
- " func(*arg, **kw)\n",
- " File \"<<a href=\"#ipython-input-36-bc417f346267\">ipython-input-36-bc417f346267</a><script>\n",
- " $(\"div.prompt.input_prompt:contains([36])\")\n",
- " .attr(\"id\", \"ipython-input-36-bc417f346267\");\n",
- " </script>>\", line 5, in test_mean_of_empty_function_raises_value_error\n",
- " mean([])\n",
- " File \"<<a href=\"#ipython-input-30-16ccb79ef6d8\">ipython-input-30-16ccb79ef6d8</a><script>\n",
- " $(\"div.prompt.input_prompt:contains([30])\")\n",
- " .attr(\"id\", \"ipython-input-30-16ccb79ef6d8\");\n",
- " </script>>\", line 6, in mean\n",
- " return total/float(len(numbers))\n",
- "ZeroDivisionError: float division by zero\n",
- "</pre>\n",
- " </div>\n",
- " "
- ],
- "output_type": "pyout",
- "prompt_number": 37,
- "text": [
- "3/4 tests passed; 1 failed\n",
- "========\n",
- "__main__.test_mean_of_empty_function_raises_value_error\n",
- "========\n",
- "Traceback (most recent call last):\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/unittest/case.py\", line 331, in run\n",
- " testMethod()\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/site-packages/nose/case.py\", line 197, in runTest\n",
- " self.test(*self.arg)\n",
- " File \"/Users/Jon/Applications/anaconda/lib/python2.7/site-packages/nose/tools/nontrivial.py\", line 60, in newfunc\n",
- " func(*arg, **kw)\n",
- " File \"<ipython-input-36-bc417f346267>\", line 5, in test_mean_of_empty_function_raises_value_error\n",
- " mean([])\n",
- " File \"<ipython-input-30-16ccb79ef6d8>\", line 6, in mean\n",
- " return total/float(len(numbers))\n",
- "ZeroDivisionError: float division by zero\n",
- "\n"
- ]
- }
- ],
- "prompt_number": 37
+ "outputs": []
},
{
"cell_type": "code",
],
"language": "python",
"metadata": {},
- "outputs": [],
- "prompt_number": 39
+ "outputs": []
},
{
"cell_type": "code",
],
"language": "python",
"metadata": {},
- "outputs": [
- {
- "html": [
- "<div id=\"ipython_nose_cd36649ad3264c26a9a1ce96cf0984c0\"></div>"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_cd36649ad3264c26a9a1ce96cf0984c0 = $(\"#ipython_nose_cd36649ad3264c26a9a1ce96cf0984c0\");"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_cd36649ad3264c26a9a1ce96cf0984c0.append($(\"<span>.</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_cd36649ad3264c26a9a1ce96cf0984c0.append($(\"<span>.</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_cd36649ad3264c26a9a1ce96cf0984c0.append($(\"<span>.</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_cd36649ad3264c26a9a1ce96cf0984c0.append($(\"<span>.</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "delete document.ipython_nose_cd36649ad3264c26a9a1ce96cf0984c0;"
- ],
- "output_type": "display_data"
- },
- {
- "html": [
- " <style type=\"text/css\">\n",
- " span.nosefailedfunc {\n",
- " font-family: monospace;\n",
- " font-weight: bold;\n",
- " }\n",
- " div.noseresults {\n",
- " width: 100%;\n",
- " }\n",
- " div.nosebar {\n",
- " float: left;\n",
- " padding: 1ex 0px 1ex 0px;\n",
- " }\n",
- " div.nosebar.fail {\n",
- " background: #ff3019; /* Old browsers */\n",
- " /* FF3.6+ */\n",
- " background: -moz-linear-gradient(top, #ff3019 0%, #cf0404 100%);\n",
- " /* Chrome,Safari4+ */\n",
- " background: -webkit-gradient(linear, left top, left bottom,\n",
- " color-stop(0%,#ff3019),\n",
- " color-stop(100%,#cf0404));\n",
- " /* Chrome10+,Safari5.1+ */\n",
- " background: -webkit-linear-gradient(top, #ff3019 0%,#cf0404 100%);\n",
- " /* Opera 11.10+ */\n",
- " background: -o-linear-gradient(top, #ff3019 0%,#cf0404 100%);\n",
- " /* IE10+ */\n",
- " background: -ms-linear-gradient(top, #ff3019 0%,#cf0404 100%);\n",
- " /* W3C */\n",
- " background: linear-gradient(to bottom, #ff3019 0%,#cf0404 100%);\n",
- " }\n",
- " div.nosebar.pass {\n",
- " background: #52b152;\n",
- " background: -moz-linear-gradient(top, #52b152 1%, #008a00 100%);\n",
- " background: -webkit-gradient(linear, left top, left bottom,\n",
- " color-stop(1%,#52b152),\n",
- " color-stop(100%,#008a00));\n",
- " background: -webkit-linear-gradient(top, #52b152 1%,#008a00 100%);\n",
- " background: -o-linear-gradient(top, #52b152 1%,#008a00 100%);\n",
- " background: -ms-linear-gradient(top, #52b152 1%,#008a00 100%);\n",
- " background: linear-gradient(to bottom, #52b152 1%,#008a00 100%);\n",
- " }\n",
- " div.nosebar.skip {\n",
- " background: #f1e767;\n",
- " background: -moz-linear-gradient(top, #f1e767 0%, #feb645 100%);\n",
- " background: -webkit-gradient(linear, left top, left bottom,\n",
- " color-stop(0%,#f1e767),\n",
- " color-stop(100%,#feb645));\n",
- " background: -webkit-linear-gradient(top, #f1e767 0%,#feb645 100%);\n",
- " background: -o-linear-gradient(top, #f1e767 0%,#feb645 100%);\n",
- " background: -ms-linear-gradient(top, #f1e767 0%,#feb645 100%);\n",
- " background: linear-gradient(to bottom, #f1e767 0%,#feb645 100%);\n",
- " }\n",
- " div.nosebar.leftmost {\n",
- " border-radius: 4px 0 0 4px;\n",
- " }\n",
- " div.nosebar.rightmost {\n",
- " border-radius: 0 4px 4px 0;\n",
- " }\n",
- " div.nosefailbanner {\n",
- " border-radius: 4px 0 0 4px;\n",
- " border-left: 10px solid #cf0404;\n",
- " padding: 0.5ex 0em 0.5ex 1em;\n",
- " margin-top: 1ex;\n",
- " margin-bottom: 0px;\n",
- " }\n",
- " div.nosefailbanner.expanded {\n",
- " border-radius: 4px 4px 0 0;\n",
- " border-top: 10px solid #cf0404;\n",
- " }\n",
- " pre.nosetraceback {\n",
- " border-radius: 0 4px 4px 4px;\n",
- " border-left: 10px solid #cf0404;\n",
- " padding: 1em;\n",
- " margin-left: 0px;\n",
- " margin-top: 0px;\n",
- " display: none;\n",
- " }\n",
- " </style>\n",
- " \n",
- " <script>\n",
- " setTimeout(function () {\n",
- " $('.nosefailtoggle').bind(\n",
- " 'click',\n",
- " function () {\n",
- " $(\n",
- " $(this)\n",
- " .parent().toggleClass('expanded')\n",
- " .parent()\n",
- " .children()\n",
- " .filter('.nosetraceback')\n",
- " ).toggle();\n",
- " }\n",
- " );},\n",
- " 0);\n",
- " </script>\n",
- " \n",
- " <div class=\"noseresults\">\n",
- " <div class=\"nosebar fail leftmost\" style=\"width: 0%\">\n",
- " \n",
- " </div>\n",
- " <div class=\"nosebar skip\" style=\"width: 0%\">\n",
- " \n",
- " </div>\n",
- " <div class=\"nosebar pass rightmost\" style=\"width: 100%\">\n",
- " \n",
- " </div>\n",
- " 4/4 tests passed\n",
- " </div>\n",
- " "
- ],
- "output_type": "pyout",
- "prompt_number": 40,
- "text": [
- "4/4 tests passed\n"
- ]
- }
- ],
- "prompt_number": 40
+ "outputs": []
},
{
"cell_type": "code",
],
"language": "python",
"metadata": {},
- "outputs": [
- {
- "ename": "ValueError",
- "evalue": "Empty list received by mean",
- "output_type": "pyerr",
- "traceback": [
- "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)",
- "\u001b[0;32m<ipython-input-47-e9e2222d800d>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mmean\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
- "\u001b[0;32m<ipython-input-39-9120caace96b>\u001b[0m in \u001b[0;36mmean\u001b[0;34m(numbers)\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0;34m'''Returns the mean of the provided list of numbers.'''\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mnumbers\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0;36m0\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 4\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mValueError\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"Empty list received by mean\"\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 5\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 6\u001b[0m \u001b[0mtotal\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m0.0\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
- "\u001b[0;31mValueError\u001b[0m: Empty list received by mean"
- ]
- }
- ],
- "prompt_number": 47
+ "outputs": []
},
{
"cell_type": "markdown",
],
"language": "python",
"metadata": {},
- "outputs": [],
- "prompt_number": 48
+ "outputs": []
},
{
"cell_type": "markdown",
],
"language": "python",
"metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "2011-04-22 21:06 Grizzly 36\r\n",
- "2011-04-23 14:12 Elk 25\r\n",
- "2011-04-23 10:24 Elk 26\r\n",
- "2011-04-23 20:08 Wolverine 31\r\n",
- "2011-04-23 18:46 Muskox 20\r\n"
- ]
- }
- ],
- "prompt_number": 49
+ "outputs": []
},
{
"cell_type": "code",
],
"language": "python",
"metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "(['2011-04-23', '2011-04-23'], ['14:12', '10:24'], ['Elk', 'Elk'], [25, 26])"
- ]
- },
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n"
- ]
- }
- ],
- "prompt_number": 50
+ "outputs": []
},
{
"cell_type": "markdown",
],
"language": "python",
"metadata": {},
- "outputs": [],
- "prompt_number": 54
+ "outputs": []
},
{
"cell_type": "code",
],
"language": "python",
"metadata": {},
- "outputs": [],
- "prompt_number": 57
+ "outputs": []
},
{
"cell_type": "code",
],
"language": "python",
"metadata": {},
- "outputs": [
- {
- "html": [
- "<div id=\"ipython_nose_421c36436bd1424eaeea6cc04f73853f\"></div>"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_421c36436bd1424eaeea6cc04f73853f = $(\"#ipython_nose_421c36436bd1424eaeea6cc04f73853f\");"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_421c36436bd1424eaeea6cc04f73853f.append($(\"<span>.</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_421c36436bd1424eaeea6cc04f73853f.append($(\"<span>.</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_421c36436bd1424eaeea6cc04f73853f.append($(\"<span>.</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_421c36436bd1424eaeea6cc04f73853f.append($(\"<span>.</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_421c36436bd1424eaeea6cc04f73853f.append($(\"<span>.</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_421c36436bd1424eaeea6cc04f73853f.append($(\"<span>.</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_421c36436bd1424eaeea6cc04f73853f.append($(\"<span>.</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_421c36436bd1424eaeea6cc04f73853f.append($(\"<span>.</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_421c36436bd1424eaeea6cc04f73853f.append($(\"<span>.</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_421c36436bd1424eaeea6cc04f73853f.append($(\"<span>.</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "delete document.ipython_nose_421c36436bd1424eaeea6cc04f73853f;"
- ],
- "output_type": "display_data"
- },
- {
- "html": [
- " <style type=\"text/css\">\n",
- " span.nosefailedfunc {\n",
- " font-family: monospace;\n",
- " font-weight: bold;\n",
- " }\n",
- " div.noseresults {\n",
- " width: 100%;\n",
- " }\n",
- " div.nosebar {\n",
- " float: left;\n",
- " padding: 1ex 0px 1ex 0px;\n",
- " }\n",
- " div.nosebar.fail {\n",
- " background: #ff3019; /* Old browsers */\n",
- " /* FF3.6+ */\n",
- " background: -moz-linear-gradient(top, #ff3019 0%, #cf0404 100%);\n",
- " /* Chrome,Safari4+ */\n",
- " background: -webkit-gradient(linear, left top, left bottom,\n",
- " color-stop(0%,#ff3019),\n",
- " color-stop(100%,#cf0404));\n",
- " /* Chrome10+,Safari5.1+ */\n",
- " background: -webkit-linear-gradient(top, #ff3019 0%,#cf0404 100%);\n",
- " /* Opera 11.10+ */\n",
- " background: -o-linear-gradient(top, #ff3019 0%,#cf0404 100%);\n",
- " /* IE10+ */\n",
- " background: -ms-linear-gradient(top, #ff3019 0%,#cf0404 100%);\n",
- " /* W3C */\n",
- " background: linear-gradient(to bottom, #ff3019 0%,#cf0404 100%);\n",
- " }\n",
- " div.nosebar.pass {\n",
- " background: #52b152;\n",
- " background: -moz-linear-gradient(top, #52b152 1%, #008a00 100%);\n",
- " background: -webkit-gradient(linear, left top, left bottom,\n",
- " color-stop(1%,#52b152),\n",
- " color-stop(100%,#008a00));\n",
- " background: -webkit-linear-gradient(top, #52b152 1%,#008a00 100%);\n",
- " background: -o-linear-gradient(top, #52b152 1%,#008a00 100%);\n",
- " background: -ms-linear-gradient(top, #52b152 1%,#008a00 100%);\n",
- " background: linear-gradient(to bottom, #52b152 1%,#008a00 100%);\n",
- " }\n",
- " div.nosebar.skip {\n",
- " background: #f1e767;\n",
- " background: -moz-linear-gradient(top, #f1e767 0%, #feb645 100%);\n",
- " background: -webkit-gradient(linear, left top, left bottom,\n",
- " color-stop(0%,#f1e767),\n",
- " color-stop(100%,#feb645));\n",
- " background: -webkit-linear-gradient(top, #f1e767 0%,#feb645 100%);\n",
- " background: -o-linear-gradient(top, #f1e767 0%,#feb645 100%);\n",
- " background: -ms-linear-gradient(top, #f1e767 0%,#feb645 100%);\n",
- " background: linear-gradient(to bottom, #f1e767 0%,#feb645 100%);\n",
- " }\n",
- " div.nosebar.leftmost {\n",
- " border-radius: 4px 0 0 4px;\n",
- " }\n",
- " div.nosebar.rightmost {\n",
- " border-radius: 0 4px 4px 0;\n",
- " }\n",
- " div.nosefailbanner {\n",
- " border-radius: 4px 0 0 4px;\n",
- " border-left: 10px solid #cf0404;\n",
- " padding: 0.5ex 0em 0.5ex 1em;\n",
- " margin-top: 1ex;\n",
- " margin-bottom: 0px;\n",
- " }\n",
- " div.nosefailbanner.expanded {\n",
- " border-radius: 4px 4px 0 0;\n",
- " border-top: 10px solid #cf0404;\n",
- " }\n",
- " pre.nosetraceback {\n",
- " border-radius: 0 4px 4px 4px;\n",
- " border-left: 10px solid #cf0404;\n",
- " padding: 1em;\n",
- " margin-left: 0px;\n",
- " margin-top: 0px;\n",
- " display: none;\n",
- " }\n",
- " </style>\n",
- " \n",
- " <script>\n",
- " setTimeout(function () {\n",
- " $('.nosefailtoggle').bind(\n",
- " 'click',\n",
- " function () {\n",
- " $(\n",
- " $(this)\n",
- " .parent().toggleClass('expanded')\n",
- " .parent()\n",
- " .children()\n",
- " .filter('.nosetraceback')\n",
- " ).toggle();\n",
- " }\n",
- " );},\n",
- " 0);\n",
- " </script>\n",
- " \n",
- " <div class=\"noseresults\">\n",
- " <div class=\"nosebar fail leftmost\" style=\"width: 0%\">\n",
- " \n",
- " </div>\n",
- " <div class=\"nosebar skip\" style=\"width: 0%\">\n",
- " \n",
- " </div>\n",
- " <div class=\"nosebar pass rightmost\" style=\"width: 100%\">\n",
- " \n",
- " </div>\n",
- " 10/10 tests passed\n",
- " </div>\n",
- " "
- ],
- "output_type": "pyout",
- "prompt_number": 58,
- "text": [
- "10/10 tests passed\n"
- ]
- }
- ],
- "prompt_number": 58
+ "outputs": []
},
{
"cell_type": "markdown",
],
"language": "python",
"metadata": {},
- "outputs": [],
- "prompt_number": 72
+ "outputs": []
},
{
"cell_type": "markdown",
],
"language": "python",
"metadata": {},
- "outputs": [],
- "prompt_number": 75
+ "outputs": []
},
{
"cell_type": "code",
],
"language": "python",
"metadata": {},
- "outputs": [
- {
- "html": [
- "<div id=\"ipython_nose_5c9bfbdef5e84275adfd02c8a2b010f0\"></div>"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_5c9bfbdef5e84275adfd02c8a2b010f0 = $(\"#ipython_nose_5c9bfbdef5e84275adfd02c8a2b010f0\");"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_5c9bfbdef5e84275adfd02c8a2b010f0.append($(\"<span>.</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_5c9bfbdef5e84275adfd02c8a2b010f0.append($(\"<span>.</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_5c9bfbdef5e84275adfd02c8a2b010f0.append($(\"<span>.</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_5c9bfbdef5e84275adfd02c8a2b010f0.append($(\"<span>.</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_5c9bfbdef5e84275adfd02c8a2b010f0.append($(\"<span>.</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_5c9bfbdef5e84275adfd02c8a2b010f0.append($(\"<span>.</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_5c9bfbdef5e84275adfd02c8a2b010f0.append($(\"<span>.</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_5c9bfbdef5e84275adfd02c8a2b010f0.append($(\"<span>.</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_5c9bfbdef5e84275adfd02c8a2b010f0.append($(\"<span>.</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_5c9bfbdef5e84275adfd02c8a2b010f0.append($(\"<span>.</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_5c9bfbdef5e84275adfd02c8a2b010f0.append($(\"<span>.</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_5c9bfbdef5e84275adfd02c8a2b010f0.append($(\"<span>.</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_5c9bfbdef5e84275adfd02c8a2b010f0.append($(\"<span>.</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "document.ipython_nose_5c9bfbdef5e84275adfd02c8a2b010f0.append($(\"<span>.</span>\"));"
- ],
- "output_type": "display_data"
- },
- {
- "javascript": [
- "delete document.ipython_nose_5c9bfbdef5e84275adfd02c8a2b010f0;"
- ],
- "output_type": "display_data"
- },
- {
- "html": [
- " <style type=\"text/css\">\n",
- " span.nosefailedfunc {\n",
- " font-family: monospace;\n",
- " font-weight: bold;\n",
- " }\n",
- " div.noseresults {\n",
- " width: 100%;\n",
- " }\n",
- " div.nosebar {\n",
- " float: left;\n",
- " padding: 1ex 0px 1ex 0px;\n",
- " }\n",
- " div.nosebar.fail {\n",
- " background: #ff3019; /* Old browsers */\n",
- " /* FF3.6+ */\n",
- " background: -moz-linear-gradient(top, #ff3019 0%, #cf0404 100%);\n",
- " /* Chrome,Safari4+ */\n",
- " background: -webkit-gradient(linear, left top, left bottom,\n",
- " color-stop(0%,#ff3019),\n",
- " color-stop(100%,#cf0404));\n",
- " /* Chrome10+,Safari5.1+ */\n",
- " background: -webkit-linear-gradient(top, #ff3019 0%,#cf0404 100%);\n",
- " /* Opera 11.10+ */\n",
- " background: -o-linear-gradient(top, #ff3019 0%,#cf0404 100%);\n",
- " /* IE10+ */\n",
- " background: -ms-linear-gradient(top, #ff3019 0%,#cf0404 100%);\n",
- " /* W3C */\n",
- " background: linear-gradient(to bottom, #ff3019 0%,#cf0404 100%);\n",
- " }\n",
- " div.nosebar.pass {\n",
- " background: #52b152;\n",
- " background: -moz-linear-gradient(top, #52b152 1%, #008a00 100%);\n",
- " background: -webkit-gradient(linear, left top, left bottom,\n",
- " color-stop(1%,#52b152),\n",
- " color-stop(100%,#008a00));\n",
- " background: -webkit-linear-gradient(top, #52b152 1%,#008a00 100%);\n",
- " background: -o-linear-gradient(top, #52b152 1%,#008a00 100%);\n",
- " background: -ms-linear-gradient(top, #52b152 1%,#008a00 100%);\n",
- " background: linear-gradient(to bottom, #52b152 1%,#008a00 100%);\n",
- " }\n",
- " div.nosebar.skip {\n",
- " background: #f1e767;\n",
- " background: -moz-linear-gradient(top, #f1e767 0%, #feb645 100%);\n",
- " background: -webkit-gradient(linear, left top, left bottom,\n",
- " color-stop(0%,#f1e767),\n",
- " color-stop(100%,#feb645));\n",
- " background: -webkit-linear-gradient(top, #f1e767 0%,#feb645 100%);\n",
- " background: -o-linear-gradient(top, #f1e767 0%,#feb645 100%);\n",
- " background: -ms-linear-gradient(top, #f1e767 0%,#feb645 100%);\n",
- " background: linear-gradient(to bottom, #f1e767 0%,#feb645 100%);\n",
- " }\n",
- " div.nosebar.leftmost {\n",
- " border-radius: 4px 0 0 4px;\n",
- " }\n",
- " div.nosebar.rightmost {\n",
- " border-radius: 0 4px 4px 0;\n",
- " }\n",
- " div.nosefailbanner {\n",
- " border-radius: 4px 0 0 4px;\n",
- " border-left: 10px solid #cf0404;\n",
- " padding: 0.5ex 0em 0.5ex 1em;\n",
- " margin-top: 1ex;\n",
- " margin-bottom: 0px;\n",
- " }\n",
- " div.nosefailbanner.expanded {\n",
- " border-radius: 4px 4px 0 0;\n",
- " border-top: 10px solid #cf0404;\n",
- " }\n",
- " pre.nosetraceback {\n",
- " border-radius: 0 4px 4px 4px;\n",
- " border-left: 10px solid #cf0404;\n",
- " padding: 1em;\n",
- " margin-left: 0px;\n",
- " margin-top: 0px;\n",
- " display: none;\n",
- " }\n",
- " </style>\n",
- " \n",
- " <script>\n",
- " setTimeout(function () {\n",
- " $('.nosefailtoggle').bind(\n",
- " 'click',\n",
- " function () {\n",
- " $(\n",
- " $(this)\n",
- " .parent().toggleClass('expanded')\n",
- " .parent()\n",
- " .children()\n",
- " .filter('.nosetraceback')\n",
- " ).toggle();\n",
- " }\n",
- " );},\n",
- " 0);\n",
- " </script>\n",
- " \n",
- " <div class=\"noseresults\">\n",
- " <div class=\"nosebar fail leftmost\" style=\"width: 0%\">\n",
- " \n",
- " </div>\n",
- " <div class=\"nosebar skip\" style=\"width: 0%\">\n",
- " \n",
- " </div>\n",
- " <div class=\"nosebar pass rightmost\" style=\"width: 100%\">\n",
- " \n",
- " </div>\n",
- " 14/14 tests passed\n",
- " </div>\n",
- " "
- ],
- "output_type": "pyout",
- "prompt_number": 76,
- "text": [
- "14/14 tests passed\n"
- ]
- }
- ],
- "prompt_number": 76
+ "outputs": []
},
{
"cell_type": "markdown",