Bug 1760812 - imgbased/src/imgbased/local.py fails unit testing with nosetests-3
Summary: imgbased/src/imgbased/local.py fails unit testing with nosetests-3
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: imgbased
Classification: oVirt
Component: General
Version: ---
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: ovirt-4.4.0
: 1.2.6
Assignee: Yuval Turgeman
QA Contact: Sandro Bonazzola
URL:
Whiteboard:
Depends On:
Blocks: 1696701
TreeView+ depends on / blocked
 
Reported: 2019-10-11 11:47 UTC by Sandro Bonazzola
Modified: 2020-05-20 20:03 UTC (History)
11 users (show)

Fixed In Version: imgbased-1.2.6
Clone Of:
Environment:
Last Closed: 2020-05-20 20:03:30 UTC
oVirt Team: Node
Embargoed:
sbonazzo: ovirt-4.4?
cshao: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 104058 0 'None' MERGED automation: drop nosetests on el8 2020-05-14 06:45:04 UTC
oVirt gerrit 104464 0 'None' MERGED build: fix nosetest checks with python3 2020-05-14 06:45:04 UTC

Description Sandro Bonazzola 2019-10-11 11:47:59 UTC
[2019-10-11T11:20:18.899Z] ======================================================================

[2019-10-11T11:20:18.899Z] FAIL: Doctest: imgbased.local.Configuration.sections

[2019-10-11T11:20:18.899Z] ----------------------------------------------------------------------

[2019-10-11T11:20:18.899Z] Traceback (most recent call last):

[2019-10-11T11:20:18.899Z]   File "/usr/lib64/python3.6/doctest.py", line 2199, in runTest

[2019-10-11T11:20:18.899Z]     raise self.failureException(self.format_failure(new.getvalue()))

[2019-10-11T11:20:18.899Z] AssertionError: Failed doctest test for imgbased.local.Configuration.sections

[2019-10-11T11:20:18.899Z]   File "/home/jenkins/workspace/imgbased_standard-check-patch/imgbased/src/imgbased/local.py", line 151, in sections

[2019-10-11T11:20:18.899Z] 

[2019-10-11T11:20:18.899Z] ----------------------------------------------------------------------

[2019-10-11T11:20:18.899Z] File "/home/jenkins/workspace/imgbased_standard-check-patch/imgbased/src/imgbased/local.py", line 170, in imgbased.local.Configuration.sections

[2019-10-11T11:20:18.899Z] Failed example:

[2019-10-11T11:20:18.899Z]     list(rs.sections())

[2019-10-11T11:20:18.899Z] Exception raised:

[2019-10-11T11:20:18.899Z]     Traceback (most recent call last):

[2019-10-11T11:20:18.899Z]       File "/usr/lib64/python3.6/doctest.py", line 1330, in __run

[2019-10-11T11:20:18.899Z]         compileflags, 1), test.globs)

[2019-10-11T11:20:18.899Z]       File "<doctest imgbased.local.Configuration.sections[5]>", line 1, in <module>

[2019-10-11T11:20:18.899Z]         list(rs.sections())

[2019-10-11T11:20:18.899Z]       File "/home/jenkins/workspace/imgbased_standard-check-patch/imgbased/src/imgbased/local.py", line 202, in sections

[2019-10-11T11:20:18.899Z]         p = self._parser()

[2019-10-11T11:20:18.899Z]       File "/home/jenkins/workspace/imgbased_standard-check-patch/imgbased/src/imgbased/local.py", line 122, in _parser

[2019-10-11T11:20:18.899Z]         p.readfp(BytesIO(self.cfgstr))

[2019-10-11T11:20:18.899Z]     TypeError: a bytes-like object is required, not 'str'

[2019-10-11T11:20:18.899Z] ----------------------------------------------------------------------

[2019-10-11T11:20:18.899Z] File "/home/jenkins/workspace/imgbased_standard-check-patch/imgbased/src/imgbased/local.py", line 173, in imgbased.local.Configuration.sections

[2019-10-11T11:20:18.899Z] Failed example:

[2019-10-11T11:20:18.899Z]     list(rs.sections("core"))

[2019-10-11T11:20:18.899Z] Exception raised:

[2019-10-11T11:20:18.899Z]     Traceback (most recent call last):

[2019-10-11T11:20:18.899Z]       File "/usr/lib64/python3.6/doctest.py", line 1330, in __run

[2019-10-11T11:20:18.899Z]         compileflags, 1), test.globs)

[2019-10-11T11:20:18.899Z]       File "<doctest imgbased.local.Configuration.sections[6]>", line 1, in <module>

[2019-10-11T11:20:18.899Z]         list(rs.sections("core"))

[2019-10-11T11:20:18.899Z]       File "/home/jenkins/workspace/imgbased_standard-check-patch/imgbased/src/imgbased/local.py", line 202, in sections

[2019-10-11T11:20:18.899Z]         p = self._parser()

[2019-10-11T11:20:18.899Z]       File "/home/jenkins/workspace/imgbased_standard-check-patch/imgbased/src/imgbased/local.py", line 122, in _parser

[2019-10-11T11:20:18.899Z]         p.readfp(BytesIO(self.cfgstr))

[2019-10-11T11:20:18.899Z]     TypeError: a bytes-like object is required, not 'str'

[2019-10-11T11:20:18.899Z] ----------------------------------------------------------------------

[2019-10-11T11:20:18.899Z] File "/home/jenkins/workspace/imgbased_standard-check-patch/imgbased/src/imgbased/local.py", line 176, in imgbased.local.Configuration.sections

[2019-10-11T11:20:18.899Z] Failed example:

[2019-10-11T11:20:18.899Z]     list(rs.sections(Configuration.CoreSection))

[2019-10-11T11:20:18.899Z] Exception raised:

[2019-10-11T11:20:18.899Z]     Traceback (most recent call last):

[2019-10-11T11:20:18.899Z]       File "/usr/lib64/python3.6/doctest.py", line 1330, in __run

[2019-10-11T11:20:18.899Z]         compileflags, 1), test.globs)

[2019-10-11T11:20:18.899Z]       File "<doctest imgbased.local.Configuration.sections[7]>", line 1, in <module>

[2019-10-11T11:20:18.899Z]         list(rs.sections(Configuration.CoreSection))

[2019-10-11T11:20:18.899Z]       File "/home/jenkins/workspace/imgbased_standard-check-patch/imgbased/src/imgbased/local.py", line 202, in sections

[2019-10-11T11:20:18.899Z]         p = self._parser()

[2019-10-11T11:20:18.899Z]       File "/home/jenkins/workspace/imgbased_standard-check-patch/imgbased/src/imgbased/local.py", line 122, in _parser

[2019-10-11T11:20:18.899Z]         p.readfp(BytesIO(self.cfgstr))

[2019-10-11T11:20:18.899Z]     TypeError: a bytes-like object is required, not 'str'

[2019-10-11T11:20:18.899Z] ----------------------------------------------------------------------

[2019-10-11T11:20:18.899Z] File "/home/jenkins/workspace/imgbased_standard-check-patch/imgbased/src/imgbased/local.py", line 179, in imgbased.local.Configuration.sections

[2019-10-11T11:20:18.899Z] Failed example:

[2019-10-11T11:20:18.899Z]     core = rs.section(Configuration.CoreSection)

[2019-10-11T11:20:18.899Z] Exception raised:

[2019-10-11T11:20:18.899Z]     Traceback (most recent call last):

[2019-10-11T11:20:18.899Z]       File "/usr/lib64/python3.6/doctest.py", line 1330, in __run

[2019-10-11T11:20:18.899Z]         compileflags, 1), test.globs)

[2019-10-11T11:20:18.899Z]       File "<doctest imgbased.local.Configuration.sections[8]>", line 1, in <module>

[2019-10-11T11:20:18.899Z]         core = rs.section(Configuration.CoreSection)

[2019-10-11T11:20:18.899Z]       File "/home/jenkins/workspace/imgbased_standard-check-patch/imgbased/src/imgbased/local.py", line 137, in section

[2019-10-11T11:20:18.899Z]         sections = [s for s in self.sections(filter_type)

[2019-10-11T11:20:18.899Z]       File "/home/jenkins/workspace/imgbased_standard-check-patch/imgbased/src/imgbased/local.py", line 137, in <listcomp>

[2019-10-11T11:20:18.899Z]         sections = [s for s in self.sections(filter_type)

[2019-10-11T11:20:18.899Z]       File "/home/jenkins/workspace/imgbased_standard-check-patch/imgbased/src/imgbased/local.py", line 202, in sections

[2019-10-11T11:20:18.899Z]         p = self._parser()

[2019-10-11T11:20:18.899Z]       File "/home/jenkins/workspace/imgbased_standard-check-patch/imgbased/src/imgbased/local.py", line 122, in _parser

[2019-10-11T11:20:18.899Z]         p.readfp(BytesIO(self.cfgstr))

[2019-10-11T11:20:18.899Z]     TypeError: a bytes-like object is required, not 'str'

[2019-10-11T11:20:18.899Z] ----------------------------------------------------------------------

[2019-10-11T11:20:18.899Z] File "/home/jenkins/workspace/imgbased_standard-check-patch/imgbased/src/imgbased/local.py", line 180, in imgbased.local.Configuration.sections

[2019-10-11T11:20:18.899Z] Failed example:

[2019-10-11T11:20:18.899Z]     core

[2019-10-11T11:20:18.899Z] Exception raised:

[2019-10-11T11:20:18.899Z]     Traceback (most recent call last):

[2019-10-11T11:20:18.899Z]       File "/usr/lib64/python3.6/doctest.py", line 1330, in __run

[2019-10-11T11:20:18.899Z]         compileflags, 1), test.globs)

[2019-10-11T11:20:18.899Z]       File "<doctest imgbased.local.Configuration.sections[9]>", line 1, in <module>

[2019-10-11T11:20:18.899Z]         core

[2019-10-11T11:20:18.899Z]     NameError: name 'core' is not defined

[2019-10-11T11:20:18.899Z] ----------------------------------------------------------------------

[2019-10-11T11:20:18.899Z] File "/home/jenkins/workspace/imgbased_standard-check-patch/imgbased/src/imgbased/local.py", line 182, in imgbased.local.Configuration.sections

[2019-10-11T11:20:18.899Z] Failed example:

[2019-10-11T11:20:18.899Z]     core.debug = 11

[2019-10-11T11:20:18.899Z] Exception raised:

[2019-10-11T11:20:18.899Z]     Traceback (most recent call last):

[2019-10-11T11:20:18.899Z]       File "/usr/lib64/python3.6/doctest.py", line 1330, in __run

[2019-10-11T11:20:18.899Z]         compileflags, 1), test.globs)

[2019-10-11T11:20:18.899Z]       File "<doctest imgbased.local.Configuration.sections[10]>", line 1, in <module>

[2019-10-11T11:20:18.899Z]         core.debug = 11

[2019-10-11T11:20:18.900Z]     NameError: name 'core' is not defined

[2019-10-11T11:20:18.900Z] ----------------------------------------------------------------------

[2019-10-11T11:20:18.900Z] File "/home/jenkins/workspace/imgbased_standard-check-patch/imgbased/src/imgbased/local.py", line 183, in imgbased.local.Configuration.sections

[2019-10-11T11:20:18.900Z] Failed example:

[2019-10-11T11:20:18.900Z]     rs.save(core)

[2019-10-11T11:20:18.900Z] Exception raised:

[2019-10-11T11:20:18.900Z]     Traceback (most recent call last):

[2019-10-11T11:20:18.900Z]       File "/usr/lib64/python3.6/doctest.py", line 1330, in __run

[2019-10-11T11:20:18.900Z]         compileflags, 1), test.globs)

[2019-10-11T11:20:18.900Z]       File "<doctest imgbased.local.Configuration.sections[11]>", line 1, in <module>

[2019-10-11T11:20:18.900Z]         rs.save(core)

[2019-10-11T11:20:18.900Z]     NameError: name 'core' is not defined

[2019-10-11T11:20:18.900Z] ----------------------------------------------------------------------

[2019-10-11T11:20:18.900Z] File "/home/jenkins/workspace/imgbased_standard-check-patch/imgbased/src/imgbased/local.py", line 190, in imgbased.local.Configuration.sections

[2019-10-11T11:20:18.900Z] Failed example:

[2019-10-11T11:20:18.900Z]     core.experimental = True

[2019-10-11T11:20:18.900Z] Exception raised:

[2019-10-11T11:20:18.900Z]     Traceback (most recent call last):

[2019-10-11T11:20:18.900Z]       File "/usr/lib64/python3.6/doctest.py", line 1330, in __run

[2019-10-11T11:20:18.900Z]         compileflags, 1), test.globs)

[2019-10-11T11:20:18.900Z]       File "<doctest imgbased.local.Configuration.sections[12]>", line 1, in <module>

[2019-10-11T11:20:18.900Z]         core.experimental = True

[2019-10-11T11:20:18.900Z]     NameError: name 'core' is not defined

[2019-10-11T11:20:18.900Z] ----------------------------------------------------------------------

[2019-10-11T11:20:18.900Z] File "/home/jenkins/workspace/imgbased_standard-check-patch/imgbased/src/imgbased/local.py", line 191, in imgbased.local.Configuration.sections

[2019-10-11T11:20:18.900Z] Failed example:

[2019-10-11T11:20:18.900Z]     rs.save(core)

[2019-10-11T11:20:18.900Z] Exception raised:

[2019-10-11T11:20:18.900Z]     Traceback (most recent call last):

[2019-10-11T11:20:18.900Z]       File "/usr/lib64/python3.6/doctest.py", line 1330, in __run

[2019-10-11T11:20:18.900Z]         compileflags, 1), test.globs)

[2019-10-11T11:20:18.900Z]       File "<doctest imgbased.local.Configuration.sections[13]>", line 1, in <module>

[2019-10-11T11:20:18.900Z]         rs.save(core)

[2019-10-11T11:20:18.900Z]     NameError: name 'core' is not defined

[2019-10-11T11:20:18.900Z] ----------------------------------------------------------------------

[2019-10-11T11:20:18.900Z] File "/home/jenkins/workspace/imgbased_standard-check-patch/imgbased/src/imgbased/local.py", line 198, in imgbased.local.Configuration.sections

[2019-10-11T11:20:18.900Z] Failed example:

[2019-10-11T11:20:18.900Z]     rs.remove(rs.section("core"))

[2019-10-11T11:20:18.900Z] Exception raised:

[2019-10-11T11:20:18.900Z]     Traceback (most recent call last):

[2019-10-11T11:20:18.900Z]       File "/usr/lib64/python3.6/doctest.py", line 1330, in __run

[2019-10-11T11:20:18.900Z]         compileflags, 1), test.globs)

[2019-10-11T11:20:18.900Z]       File "<doctest imgbased.local.Configuration.sections[14]>", line 1, in <module>

[2019-10-11T11:20:18.900Z]         rs.remove(rs.section("core"))

[2019-10-11T11:20:18.900Z]       File "/home/jenkins/workspace/imgbased_standard-check-patch/imgbased/src/imgbased/local.py", line 137, in section

[2019-10-11T11:20:18.900Z]         sections = [s for s in self.sections(filter_type)

[2019-10-11T11:20:18.900Z]       File "/home/jenkins/workspace/imgbased_standard-check-patch/imgbased/src/imgbased/local.py", line 137, in <listcomp>

[2019-10-11T11:20:18.900Z]         sections = [s for s in self.sections(filter_type)

[2019-10-11T11:20:18.900Z]       File "/home/jenkins/workspace/imgbased_standard-check-patch/imgbased/src/imgbased/local.py", line 202, in sections

[2019-10-11T11:20:18.900Z]         p = self._parser()

[2019-10-11T11:20:18.900Z]       File "/home/jenkins/workspace/imgbased_standard-check-patch/imgbased/src/imgbased/local.py", line 122, in _parser

[2019-10-11T11:20:18.900Z]         p.readfp(BytesIO(self.cfgstr))

[2019-10-11T11:20:18.900Z]     TypeError: a bytes-like object is required, not 'str'

[2019-10-11T11:20:18.900Z] 

[2019-10-11T11:20:18.900Z] -------------------- >> begin captured logging << --------------------

[2019-10-11T11:20:18.900Z] imgbased: DEBUG: Using cfgstr

[2019-10-11T11:20:18.900Z] imgbased: DEBUG: Using cfgstr

[2019-10-11T11:20:18.900Z] imgbased: DEBUG: Using cfgstr

[2019-10-11T11:20:18.900Z] imgbased: DEBUG: Using cfgstr

[2019-10-11T11:20:18.900Z] imgbased: DEBUG: Using cfgstr

[2019-10-11T11:20:18.900Z] --------------------- >> end captured logging << ---------------------

Comment 1 Sandro Bonazzola 2020-05-20 20:03:30 UTC
This bugzilla is included in oVirt 4.4.0 release, published on May 20th 2020.

Since the problem described in this bug report should be
resolved in oVirt 4.4.0 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.