コード例 #1
0
 def test_is_empty_zero_size(self) -> None:
     """
     Test that is_empty is True when there is a matrix set but its size is 0.
     """
     e = MatrixDataElement(())
     assert isinstance(e._matrix, np.ndarray)
     assert e.is_empty() is True
コード例 #2
0
 def test_is_empty_false(self) -> None:
     """
     Test that is_empty is False when there is valid matrix data set.
     """
     e = MatrixDataElement((1,))
     assert e.is_empty() is False
コード例 #3
0
 def test_is_empty_None(self) -> None:
     """
     Test that is_empty is True when there is no matrix set.
     """
     e = MatrixDataElement(None)
     assert e.is_empty() is True