This file is indexed.

/usr/lib/python2.7/dist-packages/openpyxl/comments/tests/test_comment.py is in python-openpyxl 2.4.9-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
from __future__ import absolute_import
# Copyright (c) 2010-2017 openpyxl

from copy import copy

from openpyxl.comments import Comment
from openpyxl.workbook import Workbook
from openpyxl.worksheet import Worksheet

import pytest

@pytest.fixture
def Comment():
    from ..comments import Comment
    return Comment


class TestComment:

    def test_ctor(self, Comment):
        comment = Comment(author="Charlie", text="A comment")
        assert comment.author == "Charlie"
        assert comment.text == "A comment"
        assert comment.parent is None


    def test_bind(self, Comment):
        comment = Comment("", "")
        comment.bind("ws")
        assert comment.parent == "ws"


    def test_unbind(self, Comment):
        comment = Comment("", "")
        comment.bind("ws")
        comment.unbind()
        assert comment.parent is None


    def test_copy(self, Comment):
        comment = Comment("", "")
        clone = copy(comment)
        assert clone is not comment
        assert comment.text == clone.text
        assert comment.author == clone.author