def test_that_all_types_are_detected_correctly(self): x = np.linspace(0, 1, 10) pa = ParticleArray(name='f', x=x) pa.remove_property('pid') info = get_all_array_names([pa]) result = get_known_types_for_arrays(info) expect = {'d_gid': KnownType("unsigned int*"), 'd_tag': KnownType("int*"), 'd_x': KnownType("double*"), 's_gid': KnownType("unsigned int*"), 's_tag': KnownType("int*"), 's_x': KnownType("double*")} for key in expect: self.assertEqual(repr(result[key]), repr(expect[key]))