@@ -187,11 +187,15 @@ def non_soma_metadata(obj) -> Dict[str, Any]:
187187 0 ,
188188 1.00000001 ,
189189 - 3.1415 ,
190+ np .float64 (- 3.1415 ),
190191 "" ,
191192 "\x00 " ,
192193 "\U00000000 " , # get's casted to \x00
193194 "\x10 abc" ,
194195 "\U00081a63 ×\x84 \x94 𘪩a\U000a4f44 Î\x10 m" ,
196+ "😀" ,
197+ "¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ® ¯ ° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿" ,
198+ "␀ ␁ ␂ ␃ ␄ ␅ ␆ ␇ ␈ ␉ ␊ ␋ ␌ ␍ ␎ ␏ ␐ ␑ ␒ ␓ ␔ ␕ ␖ ␗ ␘ ␙ ␚ ␛ ␜ ␝ ␞ ␟ ␠ ␡ ␢ ␣ " ,
195199 np .str_ ("foo" ),
196200 "a string" ,
197201 math .nan ,
@@ -226,7 +230,22 @@ def test_metadata_marshalling_OK(soma_object, test_value):
226230
227231@pytest .mark .parametrize (
228232 "bad_value" ,
229- [["a" , "b" , "c" ], {"a" : False }, [1 , 2 , 3 ], np .arange (10 )],
233+ [
234+ ["a" , "b" , "c" ],
235+ {"a" : False },
236+ [1 , 2 , 3 ],
237+ np .arange (10 ),
238+ np .bool_ (True ),
239+ np .int8 (10 ),
240+ np .int16 (10 ),
241+ np .int32 (10 ),
242+ np .int64 (10 ),
243+ np .uint8 (10 ),
244+ np .uint16 (10 ),
245+ np .uint32 (10 ),
246+ np .uint64 (10 ),
247+ np .float32 (10 ),
248+ ],
230249)
231250def test_metadata_marshalling_FAIL (soma_object , bad_value ):
232251 """Verify that unsupported metadata types raise an error immediately."""
@@ -239,7 +258,15 @@ def test_metadata_marshalling_FAIL(soma_object, bad_value):
239258
240259@pytest .mark .parametrize (
241260 "good_key" ,
242- ["" , "\x10 abc" , "\U00081a63 ×\x84 \x94 𘪩a\U000a4f44 Î\x10 m" , "a string" ],
261+ [
262+ "" ,
263+ "\x10 abc" ,
264+ "\U00081a63 ×\x84 \x94 𘪩a\U000a4f44 Î\x10 m" ,
265+ "a string" ,
266+ "😀" ,
267+ "¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ® ¯ ° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿" ,
268+ "␀ ␁ ␂ ␃ ␄ ␅ ␆ ␇ ␈ ␉ ␊ ␋ ␌ ␍ ␎ ␏ ␐ ␑ ␒ ␓ ␔ ␕ ␖ ␗ ␘ ␙ ␚ ␛ ␜ ␝ ␞ ␟ ␠ ␡ ␢ ␣ " ,
269+ ],
243270)
244271def test_metadata_good_key (soma_object , good_key ):
245272 """Verify that unsupported metadata types raise an error immediately."""
@@ -249,7 +276,14 @@ def test_metadata_good_key(soma_object, good_key):
249276
250277@pytest .mark .parametrize (
251278 "bad_key" ,
252- ["\x00 " , "AA\x00 BB" , "AA\U00000000 BB" ],
279+ [
280+ "\x00 " ,
281+ "AA\x00 BB" ,
282+ "AA\U00000000 BB" ,
283+ "😀\U00000000 " ,
284+ "¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ® ¯\x00 ° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿" ,
285+ "␀ ␁ ␂ ␃ ␄ ␅ ␆ ␇ ␈ ␉ ␊ ␋ ␌ ␍ ␎\x00 ␏ ␐ ␑ ␒ ␓ ␔ ␕ ␖ ␗ ␘ ␙ ␚ ␛ ␜ ␝ ␞ ␟ ␠ ␡ ␢ ␣ " ,
286+ ],
253287)
254288def test_metadata_bad_key (soma_object , bad_key ):
255289 """Verify that unsupported metadata types raise an error immediately."""
@@ -270,6 +304,9 @@ def test_metadata_bad_key(soma_object, bad_key):
270304 b"\xc2 " ,
271305 b"\x00 " ,
272306 np .bytes_ ("foo" ),
307+ "😀\U00000000 " ,
308+ "¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ® ¯\x00 ° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ ¿" ,
309+ "␀ ␁ ␂ ␃ ␄ ␅ ␆ ␇ ␈ ␉ ␊ ␋ ␌ ␍ ␎\x00 ␏ ␐ ␑ ␒ ␓ ␔ ␕ ␖ ␗ ␘ ␙ ␚ ␛ ␜ ␝ ␞ ␟ ␠ ␡ ␢ ␣ " ,
273310 ],
274311)
275312def test_metadata_bad_string_value (soma_object , bad_value ):
0 commit comments