Commit 2b3cc377 authored by dboe's avatar dboe
Browse files

rebased and now adding legacy test

parent 1b19801f
import numpy as np
from tempfile import NamedTemporaryFile
import pickle
import pathlib
import unittest
import tfields
......@@ -277,6 +278,12 @@ class TensorMaps_Test(TensorMaps_Empty_Test):
self._inst = tfields.TensorMaps(tensors, *self._fields,
maps=self._maps)
def test_legacy(self):
this_dir = pathlib.Path(__file__).parent
legacy_file = this_dir / 'resources/TensorMaps_0.2.1_ce3ea1fb69058dc39815be65f485abebb487a6bd.npz' # NOQA
tm = tfields.TensorMaps.load(legacy_file)
self.assertTrue(self._inst.equal(tm))
class TensorMaps_Indexing_Test(unittest.TestCase):
def setUp(self):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment