Merge ~cjwatson/lazr.config:rhinectomy into lazr.config:main

Proposed by Colin Watson
Status: Merged
Merged at revision: e4b2f8cfb6bcbf6e5475b8a9a1adfa8541631af6
Proposed branch: ~cjwatson/lazr.config:rhinectomy
Merge into: lazr.config:main
Diff against target: 236 lines (+96/-32)
5 files modified
.gitignore (+1/-0)
NEWS.rst (+1/-0)
dev/null (+0/-27)
src/lazr/config/tests/test_docs.py (+67/-0)
tox.ini (+27/-5)
Reviewer Review Type Date Requested Status
Jürgen Gmach Approve
Review via email: mp+412135@code.staging.launchpad.net

Commit message

Test using zope.testrunner rather than nose

Description of the change

`nose` is unmaintained and doesn't work with Python 3.10. There's `nose2`, but using `zope.testrunner` brings this more into line with other lazr.* projects.

To post a comment you must log in.
Revision history for this message
Jürgen Gmach (jugmac00) wrote :

Ok, I had to google rhinectomy but I still laughed :)

Hm, coverage is failing for me as 1% is missing. I am pretty sure you ran it, maybe we run a different Python version for coverage? 3.8.10 for me.

Could you please lower the minimum required coverage?

Thank you.

review: Needs Fixing
Revision history for this message
Jürgen Gmach (jugmac00) wrote :

$ tox -e coverage
GLOB sdist-make: /home/jugmac00/Projects/lazr.config/setup.py
coverage inst-nodeps: /home/jugmac00/Projects/lazr.config/.tox/.tmp/package/1/lazr.config-2.2.3.zip
coverage installed: coverage==6.1.2,lazr.config @ file:///home/jugmac00/Projects/lazr.config/.tox/.tmp/package/1/lazr.config-2.2.3.zip,lazr.delegates==2.0.4,nose==1.3.7,six==1.16.0,zope.exceptions==4.4,zope.interface==5.4.0,zope.testrunner==5.4.0
coverage run-test-pre: PYTHONHASHSEED='3527834898'
coverage run-test: commands[0] | python --version
Python 3.8.10
coverage run-test: commands[1] | coverage erase
coverage run-test: commands[2] | coverage run -m zope.testrunner --test-path src --tests-pattern '^tests'
Running zope.testrunner.layer.UnitTests tests:
  Set up zope.testrunner.layer.UnitTests in 0.000 seconds.
  Ran 24 tests with 0 failures, 0 errors and 0 skipped in 0.049 seconds.
Tearing down left over layers:
  Tear down zope.testrunner.layer.UnitTests in 0.000 seconds.
coverage run-test: commands[3] | coverage html
Wrote HTML report to htmlcov/index.html
coverage run-test: commands[4] | coverage report -m --fail-under=97
Name Stmts Miss Cover Missing
----------------------------------------------------------------------------------------------------------------
.tox/coverage/lib/python3.8/site-packages/lazr/config/__init__.py 5 0 100%
.tox/coverage/lib/python3.8/site-packages/lazr/config/_config.py 444 12 97% 55-61, 416, 560, 629, 684, 838, 841, 850
.tox/coverage/lib/python3.8/site-packages/lazr/config/_version.py 1 0 100%
.tox/coverage/lib/python3.8/site-packages/lazr/config/docs/__init__.py 0 0 100%
.tox/coverage/lib/python3.8/site-packages/lazr/config/interfaces.py 52 0 100%
.tox/coverage/lib/python3.8/site-packages/lazr/config/tests/__init__.py 0 0 100%
.tox/coverage/lib/python3.8/site-packages/lazr/config/tests/test_config.py 123 11 91% 31-33, 36-38, 154, 163-165, 172, 176-178
.tox/coverage/lib/python3.8/site-packages/lazr/config/tests/test_docs.py 19 0 100%
.tox/coverage/lib/python3.8/site-packages/lazr/config/tests/testdata/__init__.py 0 0 100%
----------------------------------------------------------------------------------------------------------------
TOTAL 644 23 96%
Coverage failure: total of 96 is less than fail-under=97
ERROR: InvocationError for command /home/jugmac00/Projects/lazr.config/.tox/coverage/bin/coverage report -m --fail-under=97 (exited with code 2)
_________________________________________________________________________________ summary _________________________________________________________________________________
ERROR: coverage: commands failed

Revision history for this message
Colin Watson (cjwatson) wrote :

The difference is that src/lazr/config/_config.py:560 is covered when I run the tests but apparently not for you. I'm not quite sure why that would be, but regardless, I've lowered the required percentage slightly for now.

Revision history for this message
Jürgen Gmach (jugmac00) wrote :

Thanks! Not going down this rabbit hole :-)

review: Approve

There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches