yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #74585
[Bug 1790847] [NEW] Faiing tests when building Rocky Debian package in Python 3.7
Public bug reported:
Building Nova 18.0.0 in Debian Sid (ie: Python 3.7), I get the below
unit test failures.
======================================================================
FAIL: nova.tests.unit.test_api_validation.PatternPropertiesTestCase.test_validate_patternProperties_fails
nova.tests.unit.test_api_validation.PatternPropertiesTestCase.test_validate_patternProperties_fails
----------------------------------------------------------------------
_StringException: Traceback (most recent call last):
File "/<<PKGBUILDDIR>>/nova/api/validation/validators.py", line 300, in validate
self.validator.validate(*args, **kwargs)
File "/usr/lib/python3/dist-packages/jsonschema/validators.py", line 129, in validate
for error in self.iter_errors(*args, **kwargs):
File "/usr/lib/python3/dist-packages/jsonschema/validators.py", line 105, in iter_errors
for error in errors:
File "/usr/lib/python3/dist-packages/jsonschema/_validators.py", line 14, in patternProperties
if re.search(pattern, k):
File "/usr/lib/python3.7/re.py", line 183, in search
return _compile(pattern, flags).search(string)
TypeError: expected string or bytes-like object
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/<<PKGBUILDDIR>>/nova/tests/unit/test_api_validation.py", line 152, in check_validation_error
method(body=body, req=req)
File "/<<PKGBUILDDIR>>/nova/api/validation/__init__.py", line 109, in wrapper
args, kwargs)
File "/<<PKGBUILDDIR>>/nova/api/validation/__init__.py", line 88, in _schema_validation_helper
schema_validator.validate(target)
File "/<<PKGBUILDDIR>>/nova/api/validation/validators.py", line 334, in validate
raise exception.ValidationError(detail=detail)
nova.exception.ValidationError: expected string or bytes-like object
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/<<PKGBUILDDIR>>/nova/tests/unit/test_api_validation.py", line 473, in test_validate_patternProperties_fails
expected_detail=detail)
File "/<<PKGBUILDDIR>>/nova/tests/unit/test_api_validation.py", line 160, in check_validation_error
'Exception details did not match expected')
File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 411, in assertEqual
self.assertThat(observed, matcher, message)
File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 498, in assertThat
raise mismatch_error
testtools.matchers._impl.MismatchError: 'expected string or buffer' != 'expected string or bytes-like object': Exception details did not match expected
======================================================================
FAIL: nova.tests.unit.test_flavors.CreateInstanceTypeTest.test_name_with_non_printable_characters
nova.tests.unit.test_flavors.CreateInstanceTypeTest.test_name_with_non_printable_characters
----------------------------------------------------------------------
_StringException: Traceback (most recent call last):
File "/<<PKGBUILDDIR>>/nova/tests/unit/test_flavors.py", line 191, in test_name_with_non_printable_characters
self.assertInvalidInput(u'm1.\u0868 #', 64, 1, 120)
File "/<<PKGBUILDDIR>>/nova/tests/unit/test_flavors.py", line 173, in assertInvalidInput
*create_args, **create_kwargs)
File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 485, in assertRaises
self.assertThat(our_callable, matcher)
File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 498, in assertThat
raise mismatch_error
testtools.matchers._impl.MismatchError: <function create at 0x7f22780b4a60> returned Flavor(created_at=2018-09-05T09:19:06Z,deleted=False,deleted_at=None,description=None,disabled=False,ephemeral_gb=0,extra_specs=<?>,flavorid='6d546cc3-f962-4e24-ae39-3e198c1721c2',id=7,is_public=True,memory_mb=64,name='m1.ࡨ #',projects=[],root_gb=120,rxtx_factor=1.0,swap=0,updated_at=None,vcpu_weight=0,vcpus=1)
** Affects: nova
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1790847
Title:
Faiing tests when building Rocky Debian package in Python 3.7
Status in OpenStack Compute (nova):
New
Bug description:
Building Nova 18.0.0 in Debian Sid (ie: Python 3.7), I get the below
unit test failures.
======================================================================
FAIL: nova.tests.unit.test_api_validation.PatternPropertiesTestCase.test_validate_patternProperties_fails
nova.tests.unit.test_api_validation.PatternPropertiesTestCase.test_validate_patternProperties_fails
----------------------------------------------------------------------
_StringException: Traceback (most recent call last):
File "/<<PKGBUILDDIR>>/nova/api/validation/validators.py", line 300, in validate
self.validator.validate(*args, **kwargs)
File "/usr/lib/python3/dist-packages/jsonschema/validators.py", line 129, in validate
for error in self.iter_errors(*args, **kwargs):
File "/usr/lib/python3/dist-packages/jsonschema/validators.py", line 105, in iter_errors
for error in errors:
File "/usr/lib/python3/dist-packages/jsonschema/_validators.py", line 14, in patternProperties
if re.search(pattern, k):
File "/usr/lib/python3.7/re.py", line 183, in search
return _compile(pattern, flags).search(string)
TypeError: expected string or bytes-like object
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/<<PKGBUILDDIR>>/nova/tests/unit/test_api_validation.py", line 152, in check_validation_error
method(body=body, req=req)
File "/<<PKGBUILDDIR>>/nova/api/validation/__init__.py", line 109, in wrapper
args, kwargs)
File "/<<PKGBUILDDIR>>/nova/api/validation/__init__.py", line 88, in _schema_validation_helper
schema_validator.validate(target)
File "/<<PKGBUILDDIR>>/nova/api/validation/validators.py", line 334, in validate
raise exception.ValidationError(detail=detail)
nova.exception.ValidationError: expected string or bytes-like object
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/<<PKGBUILDDIR>>/nova/tests/unit/test_api_validation.py", line 473, in test_validate_patternProperties_fails
expected_detail=detail)
File "/<<PKGBUILDDIR>>/nova/tests/unit/test_api_validation.py", line 160, in check_validation_error
'Exception details did not match expected')
File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 411, in assertEqual
self.assertThat(observed, matcher, message)
File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 498, in assertThat
raise mismatch_error
testtools.matchers._impl.MismatchError: 'expected string or buffer' != 'expected string or bytes-like object': Exception details did not match expected
======================================================================
FAIL: nova.tests.unit.test_flavors.CreateInstanceTypeTest.test_name_with_non_printable_characters
nova.tests.unit.test_flavors.CreateInstanceTypeTest.test_name_with_non_printable_characters
----------------------------------------------------------------------
_StringException: Traceback (most recent call last):
File "/<<PKGBUILDDIR>>/nova/tests/unit/test_flavors.py", line 191, in test_name_with_non_printable_characters
self.assertInvalidInput(u'm1.\u0868 #', 64, 1, 120)
File "/<<PKGBUILDDIR>>/nova/tests/unit/test_flavors.py", line 173, in assertInvalidInput
*create_args, **create_kwargs)
File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 485, in assertRaises
self.assertThat(our_callable, matcher)
File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 498, in assertThat
raise mismatch_error
testtools.matchers._impl.MismatchError: <function create at 0x7f22780b4a60> returned Flavor(created_at=2018-09-05T09:19:06Z,deleted=False,deleted_at=None,description=None,disabled=False,ephemeral_gb=0,extra_specs=<?>,flavorid='6d546cc3-f962-4e24-ae39-3e198c1721c2',id=7,is_public=True,memory_mb=64,name='m1.ࡨ #',projects=[],root_gb=120,rxtx_factor=1.0,swap=0,updated_at=None,vcpu_weight=0,vcpus=1)
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1790847/+subscriptions