/usr/lib/python2.7/dist-packages/neo/test/iotest/test_baseio.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 | # -*- coding: utf-8 -*-
"""
Tests of neo.io.baseio
"""
# needed for python 3 compatibility
from __future__ import absolute_import, division
try:
import unittest2 as unittest
except ImportError:
import unittest
from neo.core import objectlist
from neo.io.baseio import BaseIO
class TestIOObjects(unittest.TestCase):
def test__raise_error_when_not_readable_or_writable(self):
reader = BaseIO()
for ob in objectlist:
if ob not in BaseIO.readable_objects:
meth = getattr(reader, 'read_'+ob.__name__.lower())
self.assertRaises(AssertionError, meth, )
if ob not in BaseIO.writeable_objects:
meth = getattr(reader, 'write_'+ob.__name__.lower())
self.assertRaises(AssertionError, meth, ())
if __name__ == "__main__":
unittest.main()
|