Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests still require nose #7100

Closed
TheChymera opened this issue Oct 19, 2022 · 6 comments
Closed

Tests still require nose #7100

TheChymera opened this issue Oct 19, 2022 · 6 comments
Assignees

Comments

@TheChymera
Copy link
Contributor

TheChymera commented Oct 19, 2022

even though the test suite now works with pytest, nose is needed for testing, and not just for the docs (which is what setup.py indicates):

chymera@decohost ~/src/datalad $ git rev-parse HEAD
b3ff763c8f1eff6ec6c21c837dd4c37136944fe0
chymera@decohost ~/src/datalad $ grep nose datalad/tests/utils.py
from nose import SkipTest
from nose.plugins.attrib import attr
from nose.tools import (
from nose.tools import assert_in
from nose.tools import assert_in as in_
from nose.tools import (
    from nose.ext import dtcompat
    from nose.plugins import (
    # Monkey patch nose so it does not ERROR out whenever code asks for fileno
    # of the output. See https://github.com/nose-devs/nose/issues/6
        from nose import SkipTest
    The only way would be to instruct testing framework (i.e. nose
def ignore_nose_capturing_stdout(func):
    Originally was intended as a decorator workaround for nose's behaviour
    with redirecting sys.stdout, but now we monkey patch nose now so no test
    https://code.google.com/p/python-nose/issues/detail?id=243&can=1&sort=-id&colspec=ID%20Type%20Status%20Priority%20Stars%20Milestone%20Owner%20Summary
        "@ignore_nose_capturing_stdout no longer does anything - nose should "
@bpoldrack
Copy link
Member

@TheChymera: Is it just that you saw nose being used there or that you could not run the tests without nose being installed?

The intention here was to keep a nose-dependent tests/utils.py for a while to provide it for extensions that may still rely on nose (including our own extensions that could not be switch all at once). The tests in datalad should actually not use anything in tests/utils.py anymore, but the equivalents from tests/utils_pytest.py, so that tests/utils.py can be deleted sometime in the not too distant future.

@bpoldrack
Copy link
Member

I'm closing this, since I think there's nothing to do ATM.

@TheChymera: Please feel free to reopen, if you think I misunderstood the point of it.

@TheChymera
Copy link
Contributor Author

The tests actually failed, because the code was loaded when running the test suite, but it's ok, I just listed nose as a dependency, will re-open if it's still needed by the next release.

@bpoldrack
Copy link
Member

Actually, that suggests there's something incomplete on our end.
This should be excluded from inspection by pytest. Plus: Since CI isn't failing here, we probably manage to still install nose in their environment somehow.

Thx, @TheChymera

@bpoldrack bpoldrack reopened this Nov 2, 2022
@bpoldrack bpoldrack self-assigned this Nov 2, 2022
@TheChymera
Copy link
Contributor Author

@bpoldrack here is the build log documenting the failure on 0.17.7: https://ppb.chymera.eu/723cc0.log

bpoldrack added a commit to bpoldrack/datalad that referenced this issue Nov 3, 2022
- ignore nose based test utils file for pytest, since importing would
  require nose
- remove remaining references to nose based test utils
- remove requirement for building docs

Closes datalad#7100
@bpoldrack
Copy link
Member

Fixed by #7136

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants