def test_spearman_distances():
    #Idepontent Test
    X = [[('a', 2.5), ('b', 3.5), ('c', 3.0), ('d', 3.5),
          ('e', 2.5), ('f', 3.0)]]
    D = spearman_coefficient(X, X)
    assert_array_almost_equal(D, [[1.]])

    #Vector x Non Vector
    X = [[('a', 2.5), ('b', 3.5), ('c', 3.0), ('d', 3.5),
          ('e', 2.5), ('f', 3.0)]]
    Y = [[]]
    assert_raises(ValueError, spearman_coefficient, X, Y)

    #Vector A x Vector B
    X = [[('a', 2.5), ('b', 3.5), ('c', 3.0), ('d', 3.5),
          ('e', 2.5), ('f', 3.0)]]
    Y = [[('a', 3.0), ('b', 3.5), ('c', 1.5), ('d', 5.0),
          ('e', 3.5), ('f', 3.0)]]
    D = spearman_coefficient(X, Y)
    assert_array_almost_equal(D, [[0.5428571428]])

    #Vector N x 1
    X = [[('a', 2.5), ('b', 3.5), ('c', 3.0), ('d', 3.5)],
         [('e', 2.5), ('f', 3.0), ('g', 2.5), ('h', 4.0)]]
    Y = [[('a', 2.5), ('b', 3.5), ('c', 3.0), ('k', 3.5)]]
    D = spearman_coefficient(X, Y)
    assert_array_almost_equal(D, [[1.], [0.]])

    #N-Dimmensional Vectors
    X = [[('a', 2.5), ('b', 3.5), ('c', 3.0), ('d', 3.5)],
         [('e', 2.5), ('f', 3.0), ('g', 2.5), ('h', 4.0)]]
    Y = [[('a', 2.5), ('b', 3.5), ('c', 3.0), ('d', 3.5)],
         [('e', 2.5), ('f', 3.0), ('g', 2.5), ('h', 4.0)]]
    D = spearman_coefficient(X, Y)
    assert_array_almost_equal(D, [[1., 0.], [0., 1.]])
Generates configuration files.
dataset/ETHPy150Open muricoca/crab/scikits/crab/metrics/tests/test_pairwise.py/test_spearman_distances--crossover with--dataset/ETHPy150Open libyal/libyal/scripts/source-generate.py/ConfigurationFileGenerator.Generate