Backed out c627a6870a98 ("Use nseries in Pow.nseries()")
[sympy.git] / bin / test_import
blob3cbf18aad57fc88d8d06ef9ba62a64c39ff5cb3a
1 #! /usr/bin/python
3 """
4 Tests the speed of "import sympy" by measuring it many times in a row and
5 averaging the values.
7 Usage:
9 $ bin/test_import
10 """
12 n_tests = 50
14 from pexpect import run
15 from numpy import mean, std
17 def test():
18 t = run("python bin/test_import.py")
19 t = float(t)
20 return t
22 tests = [test() for x in range(n_tests+1)]
23 print "Note: the first run (warm up) was not included in the average + std dev"
24 print "All runs (including warm up):"
25 print tests
26 # skip the first run (warm up):
27 tests = tests[1:]
28 print "Number of tests: %d" % (n_tests)
29 print 'The speed of "import sympy" is: %f +- %f' % (mean(tests), std(tests))