Bug #6503
ceph-deploy: nosetests fail
% Done:
0%
Source:
other
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
$ git clone https://github.com/ceph/ceph-deploy.git $ cd ceph-deploy $ python setup.py test $ nosetests ... File "/home/loic/software/ceph/c/ceph_deploy/lib/remoto/lib/execnet/apipkg.py", line 112, in __makeattr raise AttributeError(name) AttributeError: apipkg
History
#1 Updated by Alfredo Deza about 10 years ago
- Status changed from New to 12
- Assignee set to Alfredo Deza
We no longer use nose to test anything in ceph-deploy. The correct way is to use tox:
$ pip install tox ... $ tox GLOB sdist-make: /Users/alfredo/python/ceph-deploy/setup.py py26 create: /Users/alfredo/python/ceph-deploy/.tox/py26 py26 installdeps: pytest, mock py26 inst: /Users/alfredo/python/ceph-deploy/.tox/dist/ceph-deploy-1.3.3.zip py26 runtests: commands[0] | py.test -v ceph_deploy/tests ============================================================================================================ test session starts ============================================================================================================= platform darwin -- Python 2.6.7 -- pytest-2.5.1 -- /Users/alfredo/python/ceph-deploy/.tox/py26/bin/python2.6 collected 91 items ceph_deploy/tests/test_cli.py:5: test_help PASSED ceph_deploy/tests/test_cli.py:16: test_bad_command PASSED ceph_deploy/tests/test_cli.py:28: test_bad_cluster PASSED ceph_deploy/tests/test_cli_install.py:13: test_help PASSED ceph_deploy/tests/test_cli_install.py:24: test_bad_no_host PASSED ceph_deploy/tests/test_cli_mon.py:13: test_help PASSED ceph_deploy/tests/test_cli_mon.py:24: test_bad_no_conf PASSED ceph_deploy/tests/test_cli_mon.py:36: test_bad_no_mon PASSED ceph_deploy/tests/test_cli_mon.py:50: test_simple PASSED ceph_deploy/tests/test_cli_new.py:13: test_help PASSED ceph_deploy/tests/test_cli_new.py:24: test_write_global_conf_section PASSED ... py26: commands succeeded py27: commands succeeded congratulations :)
We do this combining it with py.test, and it gives us the ability to test against different Python versions. This is an easy fix, and should probably get documented to prevent a user/dev from running tests like this.
#2 Updated by Alfredo Deza about 10 years ago
- Status changed from 12 to Rejected
Actually, I thought there was some mechanism in ceph-deploy that was using nose, but there isn't. Closing this as we are not compatible with nose.