This file is indexed.

/usr/lib/python3/dist-packages/openpyxl/utils/tests/test_indexed_list.py is in python3-openpyxl 2.3.0-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
import pytest


@pytest.fixture
def list():
    from ..indexed_list import IndexedList
    return IndexedList


def test_ctor(list):
    l = list(['b', 'a'])
    assert l == ['b', 'a']
    assert l.clean is False


def test_allow_duplicate_ctor(list):
    l = list(['b', 'a', 'b'])
    assert l == ['b', 'a', 'b']
    l.append('a')
    assert l == ['b', 'a', 'b']


def test_function(list):
    l = list()
    l.append('b')
    l.append('a')
    assert l == ['b', 'a']


def test_contains(list):
    l = list(['a', 'b', 'a'])
    assert l.clean is False
    assert 'a' in l
    assert l.clean is True


def test_index(list):
    l = list(['a', 'b'])
    l.append('a')
    assert l == ['a', 'b']
    l.append('c')
    assert l.index('c') == 2
    assert l.clean is True


def test_table_builder(list):
    sb = list()
    result = {'a':0, 'b':1, 'c':2, 'd':3}

    for letter in sorted(result.keys()):
        for x in range(5):
            sb.append(letter)
        assert sb.index(letter) == result[letter]
    assert sb == ['a', 'b', 'c', 'd']