This file is indexed.

/usr/lib/python2.7/dist-packages/networkx/algorithms/tests/test_distance_regular.py is in python-networkx 1.8.1-0ubuntu3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env python
from nose.tools import *
import networkx as nx

class TestDistanceRegular:

    def test_is_distance_regular(self):
        assert_true(nx.is_distance_regular(nx.icosahedral_graph()))
        assert_true(nx.is_distance_regular(nx.petersen_graph()))
        assert_true(nx.is_distance_regular(nx.cubical_graph()))
        assert_true(nx.is_distance_regular(nx.complete_bipartite_graph(3,3)))
        assert_true(nx.is_distance_regular(nx.tetrahedral_graph()))
        assert_true(nx.is_distance_regular(nx.dodecahedral_graph()))
        assert_true(nx.is_distance_regular(nx.pappus_graph()))
        assert_true(nx.is_distance_regular(nx.heawood_graph()))
        assert_true(nx.is_distance_regular(nx.cycle_graph(3)))
        # no distance regular
        assert_false(nx.is_distance_regular(nx.path_graph(4)))

    def test_not_connected(self):
        G=nx.cycle_graph(4)
        G.add_cycle([5,6,7])
        assert_false(nx.is_distance_regular(G))


    def test_global_parameters(self):
        b,c=nx.intersection_array(nx.cycle_graph(5))
        g=nx.global_parameters(b,c)
        assert_equal(list(g),[(0, 0, 2), (1, 0, 1), (1, 1, 0)])
        b,c=nx.intersection_array(nx.cycle_graph(3))
        g=nx.global_parameters(b,c)
        assert_equal(list(g),[(0, 0, 2), (1, 1, 0)])


    def test_intersection_array(self):
        b,c=nx.intersection_array(nx.cycle_graph(5))
        assert_equal(b,[2, 1])
        assert_equal(c,[1, 1])
        b,c=nx.intersection_array(nx.dodecahedral_graph())
        assert_equal(b,[3, 2, 1, 1, 1])
        assert_equal(c,[1, 1, 1, 2, 3])
        b,c=nx.intersection_array(nx.icosahedral_graph())
        assert_equal(b,[5, 2, 1])
        assert_equal(c,[1, 2, 5])