Skip to content

Instantly share code, notes, and snippets.

@pzrq
Created March 24, 2015 06:04
Show Gist options
  • Save pzrq/05a5d1a16c63e7485110 to your computer and use it in GitHub Desktop.
Save pzrq/05a5d1a16c63e7485110 to your computer and use it in GitHub Desktop.
SymPy RuntimeError test.py file
from sys import exit
import os
os.environ['SYMPY_USE_CACHE'] = 'no' # 'yes', 'no', 'debug'
from sympy import *
x, y, a, t, x_1, x_2, z, s = symbols('x y a t x_1 x_2 z s')
def test_issue_4737():
assert integrate(sin(x)/x, (x, -oo, oo)) == pi
assert integrate(sin(x)/x, (x, 0, oo)) == pi/2
if __name__ == '__main__':
try:
test_issue_4737()
except RuntimeError:
print('1')
exit(1)
else:
print('0')
exit(0)
@pzrq
Copy link
Author

pzrq commented Mar 24, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment