def test_subtraction(mat1, mat2):
    if (np.array(mat1)).shape < (2, 2) or (np.array(mat2)).shape < (2, 2):
        with pytest.raises(TypeError):
            logger.info(f"\n\t{test_subtraction.__name__} returned integer")
            matop.subtract(mat1, mat2)
    elif (np.array(mat1)).shape == (np.array(mat2)).shape:
        logger.info(f"\n\t{test_subtraction.__name__} with same matrix dims")
        act = (np.array(mat1) - np.array(mat2)).tolist()
        theo = matop.subtract(mat1, mat2)
        assert theo == act
    else:
        with pytest.raises(ValueError):
            logger.info(f"\n\t{test_subtraction.__name__} with different matrix dims")
            assert matop.subtract(mat1, mat2)