You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
814 B

  1. import unittest
  2. from os import path
  3. import six
  4. import struct
  5. from nd2reader2.artificial import ArtificialND2
  6. from nd2reader2.common import get_version, parse_version, parse_date, _add_to_metadata, _parse_unsigned_char, \
  7. _parse_unsigned_int, _parse_unsigned_long, _parse_double, check_or_make_dir
  8. from nd2reader2.exceptions import InvalidVersionError
  9. class TestArtificial(unittest.TestCase):
  10. def setUp(self):
  11. dir_path = path.dirname(path.realpath(__file__))
  12. check_or_make_dir(path.join(dir_path, 'test_data/'))
  13. self.test_file = path.join(dir_path, 'test_data/test.nd2')
  14. self.create_test_nd2()
  15. def create_test_nd2(self):
  16. with ArtificialND2(self.test_file) as artificial:
  17. self.assertIsNotNone(artificial.file_handle)
  18. artificial.close()