mardi 30 juin 2015

Difference between these two methods of testing

For testing a Python library, I can do either

python setup.py install
python setup.py test

or

python setup.py build
python setup.py test

I prefer doing it the latter way. What things would I be missing to not go for the first?

NOTE : I'm not choosing first because in that case I think something at permission level goes wrong over Travis-CI. This is the error log

======================================================================
ERROR: Failure: OSError ([Errno 20] Not a directory: '/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/networkx_metis-1.0-py2.7-linux-x86_64.egg/networkx')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/nose/loader.py", line 414, in loadTestsFromName
    addr.filename, addr.module)
  File "/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/nose/importer.py", line 47, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/nose/importer.py", line 86, in importFromDir
    if (self.sameModule(old, filename)
  File "/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/nose/importer.py", line 131, in sameModule
    if _samefile(mod_path, new_path):
  File "/home/travis/virtualenv/python2.7.9/lib/python2.7/posixpath.py", line 162, in samefile
    s1 = os.stat(f1)
OSError: [Errno 20] Not a directory: '/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/networkx_metis-1.0-py2.7-linux-x86_64.egg/networkx'
----------------------------------------------------------------------
Ran 1 test in 0.314s
FAILED (errors=1)
The command "python setup.py test" exited with 1

Aucun commentaire:

Enregistrer un commentaire