catch or assert warning ?
I think it's catch.
`with catch_warnings: ....`