Пример #1
0
def test_validator_invalid_similarity_matrix():
    """Test verfiy validity for valid similarity matrix
    """
    test_numpy_array = numpy.array([[0.1, 0.1], [0.1, 0.1]])
    module_result, match_index, result_status = validator.verify_validity(
        test_numpy_array)
    assert result_status == result.ResultStatus.ALL_OKAY
    assert module_result == False
Пример #2
0
def test_validator_invalid_type_input():
    """Test verify validity for invalid type input
    """
    with pytest.raises(TypeError):
        validator.verify_validity(None)
        validator.verify_validity(list())
        validator.verify_validity([[]])
Пример #3
0
def test_validator_invalid_input():
    """Test verify validity for invalid input
    """
    test_numpy_array = numpy.array([[None, None], [None, None]])
    with pytest.raises(ValueError):
        validator.verify_validity(test_numpy_array)
Пример #4
0
def test_validator_empty_input():
    """Test verify validity for empty input
    """
    with pytest.raises(TypeError):
        validator.verify_validity()