Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 715728 - dev-python/cmd2-0.10.2, dev-python/cmd2-1.0.1 do not declare test dependencies
Summary: dev-python/cmd2-0.10.2, dev-python/cmd2-1.0.1 do not declare test dependencies
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Matthew Thode ( prometheanfire )
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-01 08:19 UTC by Renata Nagtalon
Modified: 2020-04-03 12:19 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Renata Nagtalon 2020-04-01 08:19:48 UTC
The ebuild does not declare the dependencies needed for the test suite (which therefore aborts with errors).
From setup.py EXTRAS_REQUIRE:

    # Extra dependencies for running unit tests
    'test': ["gnureadline; sys_platform=='darwin'",  # include gnureadline on macOS to ensure it is available in tox env
             "mock ; python_version<'3.6'",  # for python 3.5 we need the third party mock module
             'codecov', 'coverage', 'pytest', 'pytest-cov', 'pytest-mock'],


Side note:
The ebuild declares dev-python/six to be a dependency but that is not listed under INSTALL_REQUIRES.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-04-02 11:46:37 UTC
What errors?  I presume you mean due to missing mock?  I don't think anything else from that list is really required.
Comment 2 Renata Nagtalon 2020-04-02 14:21:39 UTC
> What errors?

The ones I encounter were due to missing dev-python/pytest-mock and looked like:

________________ ERROR at setup of test_ansi_pouterr_always_tty ________________
file /var/tmp/portage/dev-python/cmd2-0.10.1/work/cmd2-0.10.1/tests/test_cmd2.py, line 2051
  def test_ansi_pouterr_always_tty(mocker, capsys):
E       fixture 'mocker' not found
>       available fixtures: base_app, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, commandresult_app, disable_commands_app, doctest_namespace, exit_code_repl, help_app, helpcat_app, hook_failure, monkeypatch, multiline_app, onchange_app, outsim_app, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, say_app, select_app, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, virtualenv, worker_id, workspace
>       use 'pytest --fixtures [testpath]' for help on them.

/var/tmp/portage/dev-python/cmd2-0.10.1/work/cmd2-0.10.1/tests/test_cmd2.py:2051

> I presume you mean due to missing mock?

The errors were due to missing dev-python/pytest-mock not due to missing dev-python/mock (that was installed at the time and so were the other dependencies listed above).

>  I don't think anything else from that list is really required.

I can't comment on that as I have not tried every other possible combination of the dependencies listed to check which ones are really required to let the test suite pass and which might let the test suite skip some tests and still pass. At that point I trusted the setup.py of the package to tell the truth and reported it here.
Comment 3 Larry the Git Cow gentoo-dev 2020-04-03 09:37:53 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cbf8b1a64234a9eb761b2d31be34c3f15097dffa

commit cbf8b1a64234a9eb761b2d31be34c3f15097dffa
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2020-04-03 09:28:39 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2020-04-03 09:37:48 +0000

    dev-python/cmd2: Add missing dep on pytest-mock
    
    Closes: https://bugs.gentoo.org/715728
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 dev-python/cmd2/cmd2-0.10.1.ebuild | 1 +
 dev-python/cmd2/cmd2-0.8.9.ebuild  | 1 +
 dev-python/cmd2/cmd2-1.0.1.ebuild  | 1 +
 3 files changed, 3 insertions(+)
Comment 4 Renata Nagtalon 2020-04-03 12:19:08 UTC
Thanks Michał!