Skip to content

Commit 112948c

Browse files
committed
More explicit test for correct G3TimesampleMap entry types
1 parent edd5a82 commit 112948c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

core/tests/timesample.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ def get_test_block(length, keys=['a', 'b', 'c', 'd'],
5757
constructor, cast_func = type_cycle[i % len(type_cycle)]
5858
vect = constructor(list(map(cast_func, y)))
5959
m[k] = vect
60-
if not isinstance(m[k], constructor):
61-
raise TypeError
6260
return m
6361

6462

@@ -67,6 +65,10 @@ def test_00_internal_checks(self):
6765
# Valid block.
6866
m = get_test_block(100)
6967
m.check()
68+
self.assertIsInstance(m["a"], core.G3VectorDouble)
69+
self.assertIsInstance(m["b"], core.G3VectorInt)
70+
self.assertIsInstance(m["c"], core.G3VectorString)
71+
self.assertIsInstance(m["d"], core.G3VectorBool)
7072

7173
def test_10_safety(self):
7274
m0 = get_test_block(100)

0 commit comments

Comments
 (0)