Ive found that when using pytest
for unit testing, simply importing streamlit will throw the following warning:
PendingDeprecationWarning: the matrix subclass is not the recommended way to represent matrices or deal with linear algebra (see https://docs.scipy.org/doc/numpy/user/numpy-for-matlab-users.html). Please adjust your code to use regular ndarray.
numpy.matrix(range(0)), numpy.ma.masked_array([])):
Ive found this is true for pytest 7.1.1 as well as pytest 8.0.0 and on the streamlit side, this is true for streamlit 1.2.0 and streamlit 1.8.1
This can easily be reproduced by creating a file named test_st.py
that contains import streamlit
and running pytest
on the command line.
Maybe Im missing something or something is going wrong on my end? This is a bit annoying in unit testing though. If I am missing something, tips would be appreciated