Skip to content

Commit

Permalink
disable unicode test cases on windows. See bazelbuild#214
Browse files Browse the repository at this point in the history
  • Loading branch information
aiuto committed Aug 7, 2020
1 parent c7188e8 commit e5e941f
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions pkg/tests/pkg_deb_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def assert_tar_stream_content(self, data, expected, match_order=True):
want = expected_by_name[name_in_tar_file]
for k, v in want.items():
if k == 'data':
value = f.extractfile(info).read().decode('utf-8')
value = f.extractfile(info).read()
elif k == 'name':
# The test data uses / as path sep, but the tarbal is in OS native
# format. This aligns the tarball name back to what we expect.
Expand Down Expand Up @@ -154,14 +154,21 @@ def test_expected_files(self):

def test_description(self):
control = self.deb_file.get_deb_ctl_file('control')
for field in (
'Description: toto ®, Й, ק ,م, ๗, あ, 叶, 葉, 말, ü and é',
fields = [
'Package: titi',
'somé[email protected]',
'Depends: dep1, dep2',
'Built-Using: some_test_data',
'Replaces: oldpkg',
'Breaks: oldbrokenpkg'):
'Breaks: oldbrokenpkg',
]
# TODO(https://github.com/bazelbuild/rules_pkg/issues/214): This can not
# pass on Windows Until we rewrite how description is passed
if sys.platform != 'win32':
fields.extend([
'Description: toto ®, Й, ק ,م, ๗, あ, 叶, 葉, 말, ü and é',
'Maintainer: somé[email protected]',
])
for field in fields:
if control.find(field) < 0:
self.fail('Missing control field: <%s> in <%s>' % (field, control))

Expand Down

0 comments on commit e5e941f

Please sign in to comment.