File: test_device.py

package info (click to toggle)
pynwb 2.8.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 44,316 kB
  • sloc: python: 17,501; makefile: 597; sh: 11
file content (19 lines) | stat: -rw-r--r-- 646 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from pynwb.device import Device
from pynwb.testing import NWBH5IOMixin, TestCase


class TestDeviceIO(NWBH5IOMixin, TestCase):

    def setUpContainer(self):
        """ Return the test Device to read/write """
        return Device(name='device_name',
                      description='description',
                      manufacturer='manufacturer')

    def addContainer(self, nwbfile):
        """ Add the test Device to the given NWBFile """
        nwbfile.add_device(self.container)

    def getContainer(self, nwbfile):
        """ Return the test Device from the given NWBFile """
        return nwbfile.get_device(self.container.name)