Skip to content

Commit

Permalink
py3k: Correct Unicode usage in merge test.
Browse files Browse the repository at this point in the history
  • Loading branch information
QuLogic committed Sep 16, 2015
1 parent 33f2e50 commit 9717793
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/iris/tests/results/merge/separable_combination.cml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
<coord datadims="[0]">
<auxCoord id="78c32bc2" long_name="a" points="[2005, 2005, 2005, 2026, 2026, 2026, 2002, 2002,
2002, 2002, 2002, 2002, 2502, 2502, 2502, 2502,
2502, 2502, 2502, 2502, 2502]" shape="(21,)" units="Unit('1')" value_type="string"/>
2502, 2502, 2502, 2502, 2502]" shape="(21,)" units="Unit('1')" value_type="unicode"/>
</coord>
<coord datadims="[0]">
<auxCoord id="414e1707" long_name="b" points="[ECMWF, ECMWF, ECMWF, UK Met Office,
UK Met Office, UK Met Office, CERFACS, CERFACS,
CERFACS, IFM-GEOMAR, IFM-GEOMAR, IFM-GEOMAR,
UK Met Office, UK Met Office, UK Met Office,
UK Met Office, UK Met Office, UK Met Office,
UK Met Office, UK Met Office, UK Met Office]" shape="(21,)" units="Unit('1')" value_type="string"/>
UK Met Office, UK Met Office, UK Met Office]" shape="(21,)" units="Unit('1')" value_type="unicode"/>
</coord>
<coord datadims="[0]">
<auxCoord id="56350344" long_name="c" points="[HOPE-E, Sys 1, Met 1, ENSEMBLES,
Expand All @@ -36,7 +36,7 @@
HadCM3, Sys 51, Met 15, ENSEMBLES,
HadCM3, Sys 51, Met 16, ENSEMBLES,
HadCM3, Sys 51, Met 17, ENSEMBLES,
HadCM3, Sys 51, Met 18, ENSEMBLES]" shape="(21,)" units="Unit('1')" value_type="string"/>
HadCM3, Sys 51, Met 18, ENSEMBLES]" shape="(21,)" units="Unit('1')" value_type="unicode"/>
</coord>
<coord datadims="[0]">
<auxCoord id="32546e8d" long_name="d" points="[0.0, 1.0, 2.0, 0.0, 1.0, 2.0, 0.0, 1.0, 2.0,
Expand Down
3 changes: 2 additions & 1 deletion lib/iris/tests/test_merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ def _make_cube(self, a, b, c, d, data=0):
long_name='y', units='1'), 0)

for name, value in zip(['a', 'b', 'c', 'd'], [a, b, c, d]):
dtype = np.str if isinstance(value, six.string_types) else np.float32
dtype = (np.dtype(six.text_type)
if isinstance(value, six.string_types) else np.float32)
cube.add_aux_coord(AuxCoord(np.array([value], dtype=dtype),
long_name=name, units='1'))

Expand Down

0 comments on commit 9717793

Please sign in to comment.