qingstor / qsctl

Advanced command line tool for QingStor Object Storage.
Apache License 2.0
24 stars 13 forks source link

test failed due to incorrect import #8

Closed wangzw closed 7 years ago

wangzw commented 7 years ago
wangzw:qsctl wangzw$ tox -e py27
GLOB sdist-make: /hashdata/qsctl/setup.py
py27 inst-nodeps: /hashdata/qsctl/.tox/dist/qsctl-1.1.0.zip
py27 installed: You are using pip version 8.1.2, however version 9.0.1 is available.,You should consider upgrading via the 'pip install --upgrade pip' command.,docutils==0.12,funcsigs==1.0.2,future==0.15.2,mock==2.0.0,pbr==1.10.0,py==1.4.31,pytest==3.0.3,PyYAML==3.12,qingcloud-sdk==1.0.11,qsctl==1.1.0,six==1.10.0
py27 runtests: PYTHONHASHSEED='1675402229'
py27 runtests: commands[0] | py.test
======================================== test session starts ========================================
platform darwin -- Python 2.7.10, pytest-3.0.3, py-1.4.31, pluggy-0.4.0
rootdir: /hashdata/qsctl, inifile:
collected 21 items / 9 errors

============================================== ERRORS ===============================================
___________________________ ERROR collecting tests/commands/test_base.py ____________________________
ImportError while importing test module '/hashdata/qsctl/tests/commands/test_base.py'.
Original error message:
'No module named test_data'
Make sure your test modules/packages have valid Python names.
____________________________ ERROR collecting tests/commands/test_cp.py _____________________________
ImportError while importing test module '/hashdata/qsctl/tests/commands/test_cp.py'.
Original error message:
'No module named test_data'
Make sure your test modules/packages have valid Python names.
____________________________ ERROR collecting tests/commands/test_ls.py _____________________________
ImportError while importing test module '/hashdata/qsctl/tests/commands/test_ls.py'.
Original error message:
'No module named test_data'
Make sure your test modules/packages have valid Python names.
____________________________ ERROR collecting tests/commands/test_mb.py _____________________________
ImportError while importing test module '/hashdata/qsctl/tests/commands/test_mb.py'.
Original error message:
'No module named test_data'
Make sure your test modules/packages have valid Python names.
____________________________ ERROR collecting tests/commands/test_mv.py _____________________________
ImportError while importing test module '/hashdata/qsctl/tests/commands/test_mv.py'.
Original error message:
'No module named test_data'
Make sure your test modules/packages have valid Python names.
____________________________ ERROR collecting tests/commands/test_rb.py _____________________________
ImportError while importing test module '/hashdata/qsctl/tests/commands/test_rb.py'.
Original error message:
'No module named test_data'
Make sure your test modules/packages have valid Python names.
____________________________ ERROR collecting tests/commands/test_rm.py _____________________________
ImportError while importing test module '/hashdata/qsctl/tests/commands/test_rm.py'.
Original error message:
'No module named test_data'
Make sure your test modules/packages have valid Python names.
___________________________ ERROR collecting tests/commands/test_sync.py ____________________________
ImportError while importing test module '/hashdata/qsctl/tests/commands/test_sync.py'.
Original error message:
'No module named test_data'
Make sure your test modules/packages have valid Python names.
_________________________ ERROR collecting tests/commands/test_transfer.py __________________________
ImportError while importing test module '/hashdata/qsctl/tests/commands/test_transfer.py'.
Original error message:
'No module named test_data'
Make sure your test modules/packages have valid Python names.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 9 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
====================================== 9 error in 0.20 seconds ======================================
ERROR: InvocationError: '/hashdata/qsctl/.tox/py27/bin/py.test'
______________________________________________ summary ______________________________________________
ERROR:   py27: commands failed
pengsrc commented 7 years ago

Hi, copy test_data_example.py to test_data.py, and fill out the options would fix the error.

wangzw commented 7 years ago
============================================== ERRORS ===============================================
___________________________ ERROR collecting tests/commands/test_base.py ____________________________
ImportError while importing test module '/hashdata/qsctl/tests/commands/test_base.py'.
Original error message:
'cannot import name test_bucket1'
Make sure your test modules/packages have valid Python names.
wangzw commented 7 years ago

seems test_data_example.py is overaged

Xuanwo commented 7 years ago

@wangzw Sorry for my mistake, the test_data_example.py is outdated. The right format is :

zone = 'pek3a'
test_bucket1 = 'your-test-bucket1'
test_bucket2 = 'your-test-bucket2'

retry_wait_time = 3
max_retries = 60

I will update it later.