Source: pykwalify
Version: 1.7.0-1
Severity: serious
Tags: ftbfs
https://buildd.debian.org/status/package.php?p=pykwalify&suite=sid
...
I: pybuild base:217: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.6/build; python3.6
-m pytest tests
============================= test session starts ==============================
platform linux -- Python 3.6.7rc1, pytest-3.6.4, py-1.6.0, pluggy-0.6.0
rootdir: /<<PKGBUILDDIR>>, inifile: pytest.ini
collected 47 items
tests/test_cli.py .. [ 4%]
tests/test_core.py ............. [ 31%]
tests/test_core_methods.py .... [ 40%]
tests/test_exceptions.py .. [ 44%]
tests/test_rule.py ....................... [ 93%]
tests/test_types.py . [ 95%]
tests/test_unicode.py FF [100%]
=================================== FAILURES ===================================
_____________ TestUnicode.test_files_with_unicode_content_success ______________
self = <tests.test_unicode.TestUnicode object at 0xffff92f129e8>
tmpdir = local('/tmp/pytest-of-buildd/pytest-1/test_files_with_unicode_conten0')
def test_files_with_unicode_content_success(self, tmpdir):
"""
These tests should pass with no exception raised
"""
fail_data_2s_yaml = {
'schema': {
'type': 'map',
'mapping': {
'msg': {
'type': 'int',
},
}
},
'data': {
'msg': 123,
},
'errors': []
}
source_f = tmpdir.join(u"2s\xe5.json")
> source_f.write(yaml.safe_dump(fail_data_2s_yaml, allow_unicode=True))
tests/test_unicode.py:50:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3/dist-packages/py/_path/local.py:501: in write
f = self.open(mode)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
local('/tmp/pytest-of-buildd/pytest-1/test_files_with_unicode_conten0/2s\xe5.json')
mode = 'w', ensure = False, encoding = None
def open(self, mode='r', ensure=False, encoding=None):
""" return an opened file with the given mode.
If ensure is True, create parent directories if needed.
"""
if ensure:
self.dirpath().ensure(dir=1)
if encoding:
return py.error.checked_call(io.open, self.strpath, mode,
encoding=encoding)
> return py.error.checked_call(open, self.strpath, mode)
E UnicodeEncodeError: 'ascii' codec can't encode character '\xe5' in
position 65: ordinal not in range(128)
/usr/lib/python3/dist-packages/py/_path/local.py:361: UnicodeEncodeError
_____________ TestUnicode.test_files_with_unicode_content_failing ______________
self = <tests.test_unicode.TestUnicode object at 0xffff92c8dd30>
tmpdir = local('/tmp/pytest-of-buildd/pytest-1/test_files_with_unicode_conten1')
def test_files_with_unicode_content_failing(self, tmpdir):
"""
These tests should fail with the specified exception
"""
# To trigger schema exception we must pass in a source file
fail_data_2f_yaml = {
'schema': {
'type': 'map',
'mapping': {
'msg': {
'type': 'int',
},
}
},
'data': {
'msg': 'Foobar',
},
'errors': ["Value 'Foobar' is not of type 'int'. Path: '/msg'"]
}
source_f = tmpdir.join(u"2f\xe5.json")
> source_f.write(yaml.safe_dump(fail_data_2f_yaml, allow_unicode=True))
tests/test_unicode.py:105:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3/dist-packages/py/_path/local.py:501: in write
f = self.open(mode)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self =
local('/tmp/pytest-of-buildd/pytest-1/test_files_with_unicode_conten1/2f\xe5.json')
mode = 'w', ensure = False, encoding = None
def open(self, mode='r', ensure=False, encoding=None):
""" return an opened file with the given mode.
If ensure is True, create parent directories if needed.
"""
if ensure:
self.dirpath().ensure(dir=1)
if encoding:
return py.error.checked_call(io.open, self.strpath, mode,
encoding=encoding)
> return py.error.checked_call(open, self.strpath, mode)
E UnicodeEncodeError: 'ascii' codec can't encode character '\xe5' in
position 65: ordinal not in range(128)
/usr/lib/python3/dist-packages/py/_path/local.py:361: UnicodeEncodeError
=============================== warnings summary ===============================
.pybuild/cpython3_3.6/build/tests/test_core.py::TestCore::()::test_core_files
/usr/lib/python3/dist-packages/ruamel/yaml/constructor.py:262:
DuplicateKeyFutureWarning: while constructing a mapping
in
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.6/build/tests/files/fail/test_type_float.yaml",
line 10, column 1
found duplicate key "errors" with value "[]" (original value: "[]")
in
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.6/build/tests/files/fail/test_type_float.yaml",
line 21, column 1
To suppress this check see:
http://yaml.readthedocs.io/en/latest/api.html#duplicate-keys
Duplicate keys will become and error in future releases, and are errors
by default when using the new API.
warnings.warn(DuplicateKeyFutureWarning(*args))
-- Docs: http://doc.pytest.org/en/latest/warnings.html
=============== 2 failed, 45 passed, 1 warnings in 5.39 seconds ================
E: pybuild pybuild:338: test: plugin distutils failed with: exit code=1: cd
/<<PKGBUILDDIR>>/.pybuild/cpython3_3.6/build; python3.6 -m pytest tests
dh_auto_test: pybuild --test --test-pytest -i python{version} -p "3.7 3.6"
returned exit code 13
make: *** [debian/rules:6: build-arch] Error 25