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

nose tests don't run #490

Closed
beew opened this issue Mar 19, 2023 · 3 comments · Fixed by #503
Closed

nose tests don't run #490

beew opened this issue Mar 19, 2023 · 3 comments · Fixed by #503

Comments

@beew
Copy link

beew commented Mar 19, 2023

nose is deprecated and the tests no longer run in python 3.10

nosetests
Traceback (most recent call last):
  File "/home/bernard/opt/python310/bin/nosetests", line 8, in <module>
    sys.exit(run_exit())
  File "/home/bernard/opt/python310/lib/python3.10/site-packages/nose/core.py", line 118, in __init__
    unittest.TestProgram.__init__(
  File "/home/bernard/opt/python310/lib/python3.10/unittest/main.py", line 100, in __init__
    self.parseArgs(argv)
  File "/home/bernard/opt/python310/lib/python3.10/site-packages/nose/core.py", line 179, in parseArgs
    self.createTests()
  File "/home/bernard/opt/python310/lib/python3.10/site-packages/nose/core.py", line 193, in createTests
    self.test = self.testLoader.loadTestsFromNames(self.testNames)
  File "/home/bernard/opt/python310/lib/python3.10/site-packages/nose/loader.py", line 481, in loadTestsFromNames
    return unittest.TestLoader.loadTestsFromNames(self, names, module)
  File "/home/bernard/opt/python310/lib/python3.10/unittest/loader.py", line 220, in loadTestsFromNames
    suites = [self.loadTestsFromName(name, module) for name in names]
  File "/home/bernard/opt/python310/lib/python3.10/unittest/loader.py", line 220, in <listcomp>
    suites = [self.loadTestsFromName(name, module) for name in names]
  File "/home/bernard/opt/python310/lib/python3.10/site-packages/nose/loader.py", line 454, in loadTestsFromName
    return LazySuite(
  File "/home/bernard/opt/python310/lib/python3.10/site-packages/nose/suite.py", line 53, in __init__
    super(LazySuite, self).__init__()
  File "/home/bernard/opt/python310/lib/python3.10/unittest/suite.py", line 22, in __init__
    self._tests = []
  File "/home/bernard/opt/python310/lib/python3.10/site-packages/nose/suite.py", line 106, in _set_tests
    if isinstance(tests, collections.Callable) and not is_suite:
AttributeError: module 'collections' has no attribute 'Callable'

collections.Callable is replaced by collections.abc.Callable.

OS is ubuntu 22.04.

@moorepants
Copy link
Member

We run the tests with Python 3.7 to 3.11 in the CI with nose with no errors. So I'm not sure why you are hitting an issue.

@beew
Copy link
Author

beew commented Mar 20, 2023

Ok. It runs now after uninstalling nose and installing a maintained fork nose-py3 https://github.com/atsb/nose-py3/tags

Please update your documentation or switch to pytest. nose-1.3.7 doesn't work and it is dead.

@moorepants
Copy link
Member

You'll have to provide more information. The last release of nose works fine in our tests, so I don't know what is the cause of the error you are seeing.

Please update your documentation or switch to pytest. nose-1.3.7 doesn't work and it is dead.

I am happy to review a pull request to switch to pytest.

Sigmanificient added a commit to Sigmanificient/pydy that referenced this issue Aug 21, 2024
@Sigmanificient Sigmanificient mentioned this issue Aug 21, 2024
10 tasks
Sigmanificient added a commit to Sigmanificient/pydy that referenced this issue Aug 23, 2024
Sigmanificient added a commit to Sigmanificient/pydy that referenced this issue Aug 23, 2024
Sigmanificient added a commit to Sigmanificient/pydy that referenced this issue Aug 23, 2024
Sigmanificient added a commit to Sigmanificient/pydy that referenced this issue Aug 23, 2024
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

Successfully merging a pull request may close this issue.

2 participants