This file is indexed.

/usr/lib/python2.7/dist-packages/neo/test/iotest/test_exampleio.py is in python-neo 0.3.3-2.

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
55
56
57
58
59
60
61
62
63
64
# -*- coding: utf-8 -*-
"""
Tests of neo.io.exampleio
"""

# needed for python 3 compatibility
from __future__ import absolute_import, division

try:
    import unittest2 as unittest
except ImportError:
    import unittest

from neo.io.exampleio import ExampleIO, HAVE_SCIPY
from neo.test.iotest.common_io_test import BaseTestIO


class TestExampleIO(BaseTestIO, unittest.TestCase, ):
    ioclass = ExampleIO
    files_to_test = ['fake1',
                     'fake2',
                     ]
    files_to_download = []


class TestExample2IO(unittest.TestCase):
    @unittest.skipUnless(HAVE_SCIPY, "requires scipy")
    def test_read_segment_lazy(self):
        r = ExampleIO(filename=None)
        seg = r.read_segment(cascade=True, lazy=True)
        for ana in seg.analogsignals:
            self.assertEqual(ana.size, 0)
            assert hasattr(ana, 'lazy_shape')
        for st in seg.spiketrains:
            self.assertEqual(st.size, 0)
            assert hasattr(st, 'lazy_shape')

        seg = r.read_segment(cascade=True, lazy=False)
        for ana in seg.analogsignals:
            self.assertNotEqual(ana.size, 0)
        for st in seg.spiketrains:
            self.assertNotEqual(st.size, 0)

    @unittest.skipUnless(HAVE_SCIPY, "requires scipy")
    def test_read_segment_cascade(self):
        r = ExampleIO(filename=None)
        seg = r.read_segment(cascade=False)
        self.assertEqual(len(seg.analogsignals), 0)
        seg = r.read_segment(cascade=True, num_analogsignal=4)
        self.assertEqual(len(seg.analogsignals), 4)

    @unittest.skipUnless(HAVE_SCIPY, "requires scipy")
    def test_read_analogsignal(self):
        r = ExampleIO(filename=None)
        r.read_analogsignal(lazy=False, segment_duration=15., t_start=-1)

    @unittest.skipUnless(HAVE_SCIPY, "requires scipy")
    def read_spiketrain(self):
        r = ExampleIO(filename=None)
        r.read_spiketrain(lazy=False,)


if __name__ == "__main__":
    unittest.main()