test_kwikio.py 736 B

12345678910111213141516171819202122232425262728293031
  1. # -*- coding: utf-8 -*-
  2. """
  3. Tests of neo.io.kwikio
  4. """
  5. # needed for python 3 compatibility
  6. from __future__ import division
  7. import sys
  8. import unittest
  9. try:
  10. import h5py
  11. HAVE_H5PY = True
  12. except ImportError:
  13. HAVE_H5PY = False
  14. from neo.io import kwikio
  15. from neo.test.iotest.common_io_test import BaseTestIO
  16. @unittest.skipUnless(HAVE_H5PY, "requires h5py")
  17. @unittest.skipUnless(kwikio.HAVE_KWIK, "requires klusta")
  18. class TestKwikIO(BaseTestIO, unittest.TestCase):
  19. ioclass = kwikio.KwikIO
  20. files_to_test = ['experiment1.kwik']
  21. files_to_download = ['experiment1.kwik',
  22. 'experiment1.kwx',
  23. 'experiment1_100.raw.kwd']
  24. if __name__ == "__main__":
  25. unittest.main()