henjo/pycircuit — Issue #16: pycircuit.circuit.tests.test_analysis_symbolic.test_symbolic_noise_kt_over_C
Author: michaelnt
Created: 2012-01-21 09:50:43+00:00
State: open

This test fails for me running python 2.7 and sympy 0.7.1

The use of vars is probably a bad idea as it puts symbols into the global namespace. Some of the tests in this file rely on the symbol s being defined by earlier tests, but I'm not sure why this test is failing.

```python
======================================================================
ERROR: pycircuit.circuit.tests.test_analysis_symbolic.test_symbolic_noise_kt_over_C
----------------------------------------------------------------------
Traceback (most recent call last):
File "/data/Work/pycircuit/py27/local/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/data/Work/pycircuit/pycircuit/circuit/tests/test_analysis_symbolic.py", line 131, in test_symbolic_noise_kt_over_C
noise_voltage_power = simplify(integrate(svnout, (w, 0, oo)))
File "/data/Work/pycircuit/py27/local/lib/python2.7/site-packages/sympy/utilities/decorator.py", line 24, in threaded_func
return func(expr, *args, **kwargs)
File "/data/Work/pycircuit/py27/local/lib/python2.7/site-packages/sympy/integrals/integrals.py", line 847, in integrate
return integral.doit(deep = False)
File "/data/Work/pycircuit/py27/local/lib/python2.7/site-packages/sympy/integrals/integrals.py", line 364, in doit
antideriv = self._eval_integral(function, xab[0])
File "/data/Work/pycircuit/py27/local/lib/python2.7/site-packages/sympy/integrals/integrals.py", line 577, in _eval_integral
parts.append(coeff * ratint(g, x))
File "/data/Work/pycircuit/py27/local/lib/python2.7/site-packages/sympy/integrals/rationaltools.py", line 88, in ratint
R = log_to_real(h, q, x, t)
File "/data/Work/pycircuit/py27/local/lib/python2.7/site-packages/sympy/integrals/rationaltools.py", line 254, in log_to_real
if len(R_u) != R.count_roots():
File "/data/Work/pycircuit/py27/local/lib/python2.7/site-packages/sympy/polys/polytools.py", line 2802, in count_roots
count = f.rep.count_real_roots(inf=inf, sup=sup)
File "/data/Work/pycircuit/py27/local/lib/python2.7/site-packages/sympy/polys/polyclasses.py", line 743, in count_real_roots
return dup_count_real_roots(f.rep, f.dom, inf=inf, sup=sup)
File "/data/Work/pycircuit/py27/local/lib/python2.7/site-packages/sympy/polys/rootisolation.py", line 654, in dup_count_real_roots
signs_inf = dup_sign_variations([ dup_LC(s, K)*(-1)**dup_degree(s) for s in sturm ], K)
File "/data/Work/pycircuit/py27/local/lib/python2.7/site-packages/sympy/polys/densetools.py", line 1126, in dup_sign_variations
if coeff*prev < 0:
File "/data/Work/pycircuit/py27/local/lib/python2.7/site-packages/sympy/polys/polyclasses.py", line 1278, in __lt__
_, _, _, F, G = f.frac_unify(g)
File "/data/Work/pycircuit/py27/local/lib/python2.7/site-packages/sympy/polys/polyclasses.py", line 1028, in frac_unify
raise UnificationFailed("can't unify %s with %s" % (f, g))
UnificationFailed: can't unify DMF(([[]], [[1]]), ZZ) with 0
```