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

Not able to run the tests #42

Closed
gautam-sharma1 opened this issue May 5, 2024 · 3 comments · Fixed by #43
Closed

Not able to run the tests #42

gautam-sharma1 opened this issue May 5, 2024 · 3 comments · Fixed by #43

Comments

@gautam-sharma1
Copy link

I am trying to run the tests. I have installed the repo using:

  1. Cloning the repo
  2. Running python3 -m pip install -e ".[all]"

I also install tests dependencies using:

  1. python3 -m pip install -e ".[test]"

When I run the test command highlighted in the README, I get the following error:

gautamsharma@MacBook-Pro-3 movement_primitives % python3 -m nose test
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/opt/homebrew/lib/python3.11/site-packages/nose/main.py", line 8, in
run_exit()
File "/opt/homebrew/lib/python3.11/site-packages/nose/core.py", line 118, in init
unittest.TestProgram.init(
File "/opt/homebrew/Cellar/python@3.11/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/unittest/main.py", line 101, in init
self.parseArgs(argv)
File "/opt/homebrew/lib/python3.11/site-packages/nose/core.py", line 179, in parseArgs
self.createTests()
File "/opt/homebrew/lib/python3.11/site-packages/nose/core.py", line 193, in createTests
self.test = self.testLoader.loadTestsFromNames(self.testNames)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/nose/loader.py", line 481, in loadTestsFromNames
return unittest.TestLoader.loadTestsFromNames(self, names, module)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.11/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/unittest/loader.py", line 220, in loadTestsFromNames
suites = [self.loadTestsFromName(name, module) for name in names]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.11/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/unittest/loader.py", line 220, in
suites = [self.loadTestsFromName(name, module) for name in names]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/nose/loader.py", line 454, in loadTestsFromName
return LazySuite(
^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/nose/suite.py", line 53, in init
super(LazySuite, self).init()
File "/opt/homebrew/Cellar/python@3.11/3.11.5/Frameworks/Python.framework/Versions/3.11/lib/python3.11/unittest/suite.py", line 22, in init
self._tests = []
^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/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'

My system info as follows:

gautamsharma@MacBook-Pro-3 movement_primitives % system_profiler SPHardwareDataType
**Hardware:

Hardware Overview:

  Model Name: MacBook Pro
  Model Identifier: MacBookPro18,3
  Model Number: MKGQ3LL/A
  Chip: Apple M1 Pro
  Total Number of Cores: 10 (8 performance and 2 efficiency)
  Memory: 16 GB
  System Firmware Version: 10151.81.1
  OS Loader Version: 10151.81.1
  Serial Number (system): M2J4FMXJJM
  Hardware UUID: 9E39F940-63A8-50ED-AC31-7FB37BB65822
  Provisioning UDID: 00006000-001A21C91121801E
  Activation Lock Status: Enabled**
@AlexanderFabisch
Copy link
Member

Thanks for reporting. It seems like nosetest is broken in Python 3.11. We will have to switch to pytest.

@AlexanderFabisch
Copy link
Member

@gautam-sharma1 I opened a PR that replaces nose by pytest: #43 . Could you confirm that it works? Then I will merge it to main.

@gautam-sharma1
Copy link
Author

It works now. Thank you!

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