@@ -756,7 +756,7 @@ def test_encoding_kwarg_dates(self):
756
756
self .assertEqual (actual .t .encoding ['units' ], units )
757
757
assert_identical (actual , ds )
758
758
759
- def test_encoding_kwarg_string (self ):
759
+ def test_encoding_kwarg_fixed_width_string (self ):
760
760
# regression test for GH2149
761
761
for strings in [
762
762
[b'foo' , b'bar' , b'baz' ],
@@ -948,17 +948,17 @@ def test_write_groups(self):
948
948
with open_dataset (tmp_file , group = 'data/2' ) as actual2 :
949
949
assert_identical (data2 , actual2 )
950
950
951
- @ pytest . mark . parametrize ( 'input_strings' , [
952
- [ b'foo' , b'bar' , b'baz' ],
953
- [ u 'foo' , u 'bar' , u 'baz' ],
954
- ])
955
- def test_encoding_kwarg_vlen_string ( self , input_strings ) :
956
- original = Dataset ({'x' : input_strings })
957
- expected = Dataset ({'x' : [u'foo' , u'bar' , u'baz' ]})
958
- kwargs = dict (encoding = {'x' : {'dtype' : str }})
959
- with self .roundtrip (original , save_kwargs = kwargs ) as actual :
960
- assert actual ['x' ].encoding ['dtype' ] is str
961
- assert_identical (actual , expected )
951
+ def test_encoding_kwarg_vlen_string ( self ):
952
+ for input_strings in [
953
+ [ b 'foo' , b 'bar' , b 'baz' ],
954
+ [ u'foo' , u'bar' , u'baz' ],
955
+ ] :
956
+ original = Dataset ({'x' : input_strings })
957
+ expected = Dataset ({'x' : [u'foo' , u'bar' , u'baz' ]})
958
+ kwargs = dict (encoding = {'x' : {'dtype' : str }})
959
+ with self .roundtrip (original , save_kwargs = kwargs ) as actual :
960
+ assert actual ['x' ].encoding ['dtype' ] is str
961
+ assert_identical (actual , expected )
962
962
963
963
def test_roundtrip_string_with_fill_value_vlen (self ):
964
964
values = np .array ([u'ab' , u'cdef' , np .nan ], dtype = object )
@@ -1445,7 +1445,7 @@ def test_group(self):
1445
1445
open_kwargs = {'group' : group }) as actual :
1446
1446
assert_identical (original , actual )
1447
1447
1448
- def test_encoding_kwarg_string (self ):
1448
+ def test_encoding_kwarg_fixed_width_string (self ):
1449
1449
# not relevant for zarr, since we don't use EncodedStringCoder
1450
1450
pass
1451
1451
0 commit comments