Failed brian2.test()

I Just installed brian2 and i tried to test it as suggested. 2 of 4 tests have failed, and i can’t find a clue on why.
Do you have any tip?

================

import brian2
brian2.test()

=========================

I tried to search for those errors on internet but i couldn’t find a clue

====================
The 2 failures are:

_________________________________________________________________________ [doctest] brian2.stateupdaters.explicit.split_expression _________________________________________________________________________
054 function-independent terms and terms involving f) and the
055 stochastic part of the expression (terms involving g and/or dW).
056
057 Examples
058 --------
059 >>> split_expression(‘dt * __f(__x, __t)’)
060 (dt*__f(__x, __t), None)
061 >>> split_expression(‘dt * __f(__x, __t) + __dW * __g(__x, __t)’)
062 (dt*__f(__x, __t), __dW*__g(__x, __t))
063 >>> split_expression('1/(2dt**.5)(__g_support - __g(__x, __t))(__dW2)’)
Expected:
(0, __dW
2
__g_supportdt**(-0.5)/2 - __dW**2dt**(-0.5)__g(__x, __t)/2)
Got:
(0, __dW**2
__g_support/(2dt0.5) - __dW2__g(__x, __t)/(2*dt**0.5))

/home/daniele/Scrivania/PythonCode/pythonenv/brian/lib/python3.8/site-packages/brian2/stateupdaters/explicit.py:63: DocTestFailure

@pytest.mark.codegen_independent
def test_numpy_functions_logical():
‘’’
Assure that logical numpy functions work on all quantities and return
unitless boolean arrays.
‘’’
unit_values1 = [3 * mV, np.array([1, 2]) * mV, np.ones((3, 3)) * mV]
unit_values2 = [3 * second, np.array([1, 2]) * second,
np.ones((3, 3)) * second]
for ufunc in UFUNCS_LOGICAL:
for value1, value2 in zip(unit_values1, unit_values2):
try:
# one argument

              result_units = eval('np.%s(value1)' % ufunc)

brian/lib/python3.8/site-packages/brian2/tests/test_units.py:976:


???
E TypeError: logical_and() takes from 2 to 3 positional arguments but 1 were given

:1: TypeError

========================

Hi @Depa. I just replied on the github issue (Failed brian2.test() with latest sympy/numpy · Issue #1365 · brian-team/brian2 · GitHub), but I also paste my reply here in case others on the forum run into the same issue:

Apologies for this, both errors are due to incompatibilities of two tests with the latest versions of sympy and numpy, respectively. Note that both failures are only due to the way the tests are phrased: e.g. the first failure checks for the exact output of the result of some symbolic processing of equations. With the most recent sympy version, the result is still mathematically equivalent, but no longer exactly the same (something like using dt**-0.5/2 instead of 1/(2*dt**0.5) ).
Both errors are not affecting the way Brian works, so you can safely ignore them.
The errors have already been fixed in the development version of Brian here on github, see commits 7e19957 and 62fa449.
It has been way too long since we did the last proper release, but until we do that you can use the development release from github, if you prefer. If you have git installed, you can use:

$ pip install git+https://github.com/brian-team/brian2.git

Alternatively, assuming you have already installed Brian’s dependencies, you can install the latest development version from the pypi test server:

$ pip install --pre -i https://test.pypi.org/simple/ Brian2