Commit 0aab5d43 authored by Franck Thollard's avatar Franck Thollard
Browse files

WIP: funcions

parent 4f55b497
......@@ -168,39 +168,9 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"test_add_second_twice (__main__.TestMyStuff0)\n",
"test max_temp computes correctly ... "
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"arg0 + 2*arg1 = 3 + 2*5 = 13\n",
"arg0 + 2*arg1 = aa + 2*bb = aabbbb\n",
"arg0 + 2*arg1 = [1, 2] + 2*[3, 4] = [1, 2, 3, 4, 3, 4]\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"ok\n",
"\n",
"----------------------------------------------------------------------\n",
"Ran 1 test in 0.003s\n",
"\n",
"OK\n"
]
}
],
"outputs": [],
"source": [
"import unittest\n",
"\n",
......@@ -213,16 +183,7 @@
" :return: arg0 + 2 * arg1\n",
" \"\"\"\n",
" pass\n",
"\n",
"\n",
"class TestMyStuff0(unittest.TestCase): \n",
" def test_add_second_twice(self):\n",
" \"\"\" test max_temp computes correctly\"\"\"\n",
" self.assertEqual(13, add_second_twice(3, 5))\n",
" self.assertEqual(\"aabbbb\", add_second_twice(\"aa\", \"bb\"))\n",
" self.assertListEqual([1, 2, 3, 4, 3, 4], add_second_twice([1, 2], [3, 4])) \n",
" \n",
"_res = unittest.TextTestRunner(verbosity=2).run(unittest.TestLoader().loadTestsFromTestCase(TestMyStuff0))"
"\n"
]
},
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment