'Modularity eigenvalues'

def test_modularity_spectrum(self):

    evals = numpy.array([(-1.5), 0.0, 0.0])
    e = sorted(nx.modularity_spectrum(self.P))
    assert_almost_equal(e, evals)
    evals = numpy.array([(-0.5), 0.0, 0.0])
    e = sorted(nx.modularity_spectrum(self.DG))
    assert_almost_equal(e, evals)
