我想检查 pytest 代码中的 None 值。有类似的assertIsNone(x)方法吗?我尝试过以下方法,但正在寻找更好的方法。
assert x == None, "Sucess" assert x != None, " Failure"
python pytest
pytest ×1
python ×1