Skip to content

Commit

Permalink
fixed missing test
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidLeoni committed Oct 12, 2018
1 parent 5710823 commit bb7b6d8
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions exercises/matrices/matrices-solution.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1196,7 +1196,7 @@
},
{
"cell_type": "code",
"execution_count": 27,
"execution_count": 41,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -1221,7 +1221,16 @@
" ['g','h','i']\n",
" ]\n",
"\n",
"assert diag(m) == ['a','e','i']\n"
"assert diag(m) == ['a','e','i']\n",
"\n",
"try: \n",
" diag([['a','b']])\n",
" raise Exception(\"SHOULD HAVE FAILED !\") # if diag raises an exception which is ValueError as we expect it to do,\n",
" # the code should never arrive here\n",
"except ValueError: # this only catches ValueError. Other types of errors are not catched\n",
" \"passed test\" # In an except clause you always need to put some code. \n",
" # Here we put a placeholder string just to fill in\n",
"\n"
]
},
{
Expand Down

0 comments on commit bb7b6d8

Please sign in to comment.