test_examplerawio.py 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # -*- coding: utf-8 -*-
  2. """
  3. Tests of neo.rawio.examplerawio
  4. Note for dev:
  5. if you write a new RawIO class your need to put some file
  6. to be tested at g-node portal, Ask neuralensemble list for that.
  7. The file need to be small.
  8. Then you have to copy/paste/renamed the TestExampleRawIO
  9. class and a full test will be done to test if the new coded IO
  10. is compliant with the RawIO API.
  11. If you have problems, do not hesitate to ask help github (prefered)
  12. of neuralensemble list.
  13. Note that same mechanism is used a neo.io API so files are tested
  14. several time with neo.rawio (numpy buffer) and neo.io (neo object tree).
  15. See neo.test.iotest.*
  16. Author: Samuel Garcia
  17. """
  18. # needed for python 3 compatibility
  19. from __future__ import unicode_literals, print_function, division, absolute_import
  20. import unittest
  21. from neo.rawio.examplerawio import ExampleRawIO
  22. from neo.rawio.tests.common_rawio_test import BaseTestRawIO
  23. class TestExampleRawIO(BaseTestRawIO, unittest.TestCase, ):
  24. rawioclass = ExampleRawIO
  25. # here obsvisously there is nothing to download:
  26. files_to_download = []
  27. # here we will test 2 fake files
  28. # not that IO base on dirname you can put the dirname here.
  29. entities_to_test = ['fake1',
  30. 'fake2',
  31. ]
  32. if __name__ == "__main__":
  33. unittest.main()