This file is indexed.

/usr/lib/python2.7/dist-packages/pygraphviz/tests/test_string.py is in python-pygraphviz 1.4~rc1-1.

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
45
46
47
48
49
50
51
52
53
54
# -*- coding: utf-8 -*-
from nose.tools import assert_equal, raises
import pygraphviz as pgv
from os import linesep


def test_name():
    A = pgv.AGraph(name='')
    assert_equal(A.string(),
"""strict graph {
}
""".replace('\n', linesep))


    assert_equal(A.string().expandtabs(),
"""strict graph {
}
""".replace('\n', linesep))

    assert_equal( A.__repr__()[0:7],'<AGraph')


def test_string_representation_small():
    A = pgv. AGraph(name='test')
    A.add_path([1,2])
    assert_equal(A.string().expandtabs(),
"""strict graph test {
        1 -- 2;
}
""".replace('\n', linesep)
)

def test_string_representation_large():
    A = pgv.AGraph(name='test graph')
    A.add_path([1,2,3,4,5,6,7,8,9,10])
    A.add_node(11)
    assert_equal(A.string().expandtabs(),
"""strict graph "test graph" {
        1 -- 2;
        2 -- 3;
        3 -- 4;
        4 -- 5;
        5 -- 6;
        6 -- 7;
        7 -- 8;
        8 -- 9;
        9 -- 10;
        11;
}
""".replace('\n', linesep))

@raises(pgv.DotError)
def test_bad_dot_input():
    A = pgv.AGraph(string='graph {1--1')