##// END OF EJS Templates
Don’t use ZeroDivisionError in tests...
MinRK -
Show More
@@ -1,55 +1,55
1 {
1 {
2 "metadata": {
2 "metadata": {
3 "name": ""
3 "name": ""
4 },
4 },
5 "nbformat": 3,
5 "nbformat": 3,
6 "nbformat_minor": 0,
6 "nbformat_minor": 0,
7 "worksheets": [
7 "worksheets": [
8 {
8 {
9 "cells": [
9 "cells": [
10 {
10 {
11 "cell_type": "code",
11 "cell_type": "code",
12 "collapsed": false,
12 "collapsed": false,
13 "input": [
13 "input": [
14 "1 / 0"
14 "raise Exception(\"message\")"
15 ],
15 ],
16 "language": "python",
16 "language": "python",
17 "metadata": {},
17 "metadata": {},
18 "outputs": [
18 "outputs": [
19 {
19 {
20 "ename": "ZeroDivisionError",
20 "ename": "Exception",
21 "evalue": "integer division or modulo by zero",
21 "evalue": "message",
22 "output_type": "pyerr",
22 "output_type": "pyerr",
23 "traceback": [
23 "traceback": [
24 "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[1;31mZeroDivisionError\u001b[0m Traceback (most recent call last)",
24 "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[1;31mException\u001b[0m Traceback (most recent call last)",
25 "\u001b[1;32m<ipython-input-1-b710d87c980c>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[1;36m1\u001b[0m \u001b[1;33m/\u001b[0m \u001b[1;36m0\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
25 "\u001b[1;32m<ipython-input-1-335814d14fc1>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[1;32mraise\u001b[0m \u001b[0mException\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"message\"\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
26 "\u001b[1;31mZeroDivisionError\u001b[0m: integer division or modulo by zero"
26 "\u001b[1;31mException\u001b[0m: message"
27 ]
27 ]
28 }
28 }
29 ],
29 ],
30 "prompt_number": 1
30 "prompt_number": 1
31 },
31 },
32 {
32 {
33 "cell_type": "code",
33 "cell_type": "code",
34 "collapsed": false,
34 "collapsed": false,
35 "input": [
35 "input": [
36 "print('ok')"
36 "print('ok')"
37 ],
37 ],
38 "language": "python",
38 "language": "python",
39 "metadata": {},
39 "metadata": {},
40 "outputs": [
40 "outputs": [
41 {
41 {
42 "output_type": "stream",
42 "output_type": "stream",
43 "stream": "stdout",
43 "stream": "stdout",
44 "text": [
44 "text": [
45 "ok\n"
45 "ok\n"
46 ]
46 ]
47 }
47 }
48 ],
48 ],
49 "prompt_number": 2
49 "prompt_number": 2
50 }
50 }
51 ],
51 ],
52 "metadata": {}
52 "metadata": {}
53 }
53 }
54 ]
54 ]
55 } No newline at end of file
55 }
@@ -1,55 +1,55
1 {
1 {
2 "metadata": {
2 "metadata": {
3 "name": ""
3 "name": ""
4 },
4 },
5 "nbformat": 3,
5 "nbformat": 3,
6 "nbformat_minor": 0,
6 "nbformat_minor": 0,
7 "worksheets": [
7 "worksheets": [
8 {
8 {
9 "cells": [
9 "cells": [
10 {
10 {
11 "cell_type": "code",
11 "cell_type": "code",
12 "collapsed": false,
12 "collapsed": false,
13 "input": [
13 "input": [
14 "1 / 0"
14 "raise Exception(\"message\")"
15 ],
15 ],
16 "language": "python",
16 "language": "python",
17 "metadata": {},
17 "metadata": {},
18 "outputs": [
18 "outputs": [
19 {
19 {
20 "ename": "ZeroDivisionError",
20 "ename": "Exception",
21 "evalue": "integer division or modulo by zero",
21 "evalue": "message",
22 "output_type": "pyerr",
22 "output_type": "pyerr",
23 "traceback": [
23 "traceback": [
24 "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[1;31mZeroDivisionError\u001b[0m Traceback (most recent call last)",
24 "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m\n\u001b[1;31mException\u001b[0m Traceback (most recent call last)",
25 "\u001b[1;32m<ipython-input-1-b710d87c980c>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[1;36m1\u001b[0m \u001b[1;33m/\u001b[0m \u001b[1;36m0\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
25 "\u001b[1;32m<ipython-input-1-335814d14fc1>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[1;32mraise\u001b[0m \u001b[0mException\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"message\"\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
26 "\u001b[1;31mZeroDivisionError\u001b[0m: integer division or modulo by zero"
26 "\u001b[1;31mException\u001b[0m: message"
27 ]
27 ]
28 }
28 }
29 ],
29 ],
30 "prompt_number": 1
30 "prompt_number": 1
31 },
31 },
32 {
32 {
33 "cell_type": "code",
33 "cell_type": "code",
34 "collapsed": false,
34 "collapsed": false,
35 "input": [
35 "input": [
36 "print('ok')"
36 "print('ok')"
37 ],
37 ],
38 "language": "python",
38 "language": "python",
39 "metadata": {},
39 "metadata": {},
40 "outputs": [
40 "outputs": [
41 {
41 {
42 "output_type": "stream",
42 "output_type": "stream",
43 "stream": "stdout",
43 "stream": "stdout",
44 "text": [
44 "text": [
45 "ok\n"
45 "ok\n"
46 ]
46 ]
47 }
47 }
48 ],
48 ],
49 "prompt_number": 2
49 "prompt_number": 2
50 }
50 }
51 ],
51 ],
52 "metadata": {}
52 "metadata": {}
53 }
53 }
54 ]
54 ]
55 } No newline at end of file
55 }
General Comments 0
You need to be logged in to leave comments. Login now