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

tox -e py3 invokes external programs, zip and bzr #577

Open
nobuto-m opened this issue Feb 23, 2021 · 1 comment
Open

tox -e py3 invokes external programs, zip and bzr #577

nobuto-m opened this issue Feb 23, 2021 · 1 comment

Comments

@nobuto-m
Copy link
Contributor

Without installing zip and bzr, we will see the following.

tox -e py3

======================================================================
ERROR:Failure: NotImplementedError (Unable to install bzr)                            
----------------------------------------------------------------------
Traceback(most recent call last):                                                                     
File "/home/ubuntu/charm-helpers/.tox/py3/lib/python3.8/site-packages/nose/failure.py", line 39, in runTest
raise self.exc_val.with_traceback(self.tb)                                                         
File "/home/ubuntu/charm-helpers/.tox/py3/lib/python3.8/site-packages/nose/loader.py", line 417, in loadTestsFromName
module = self.importer.importFromPath(                                                             
File "/home/ubuntu/charm-helpers/.tox/py3/lib/python3.8/site-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)                                                        
File "/home/ubuntu/charm-helpers/.tox/py3/lib/python3.8/site-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)                                 
File "/home/ubuntu/charm-helpers/.tox/py3/lib/python3.8/imp.py", line 234, in load_module
return load_source(name, filename, file)                                                           
File "/home/ubuntu/charm-helpers/.tox/py3/lib/python3.8/imp.py", line 171, in load_source
module = _load(spec)                                                                               
File "<frozen importlib._bootstrap>", line 702, in _load                             
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked                    
File "<frozen importlib._bootstrap_external>", line 783, in exec_module                                                                                                                                      
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed                                                                                                                                 
File "/home/ubuntu/charm-helpers/tests/fetch/test_bzrurl.py", line 18, in <module>   
from charmhelpers.fetch import (                                                                   
File "/home/ubuntu/charm-helpers/charmhelpers/fetch/bzrurl.py", line 29, in <module>
raise NotImplementedError('Unable to install bzr')
NotImplementedError:Unable to install bzr
juju-log: WARNING: Requested VFs (24) too high for device eth0. Falling 
back to value supprted by device: 16                                    
                                                               
juju-log: WARNING: Requested VFs (24) too high for device eth0. Falling 
back to value supprted by device: 16                                    
                                                               
........................................................................
........................................................................
..................................................DEPRECATION W
ARNING: Function __init__ is being removed : The ``Pool`` baseclass has 
been replaced by ``BasePool`` class.                                    
                                                               
........................................................................
........................................................................
...............................................................
...juju-log: ERROR: Found but was unable to parse previous config data, 
ignoring which will report all values as changed - Expecting value: line
 1 column 1 (char 0)                                           
........................................................................
........................................................................
...............................................................
........................................................................
................F.......................................................
...............................................................
........................................................................
......................................................../bin/sh: 1: zip:
 not found                                                     
S................................             
@ajkavanagh
Copy link
Contributor

It seems that this code in tests/fetch/test_bzrurl.py:

try:
    from charmhelpers.fetch import (
        bzrurl,
        UnhandledSource,
    )
except ImportError:
    bzrurl = None
    UnhandledSource = None

should actually also check for NotImplementedError.

It is fairly unusual for neither bzr not zip to be installed on the test system running the tests, but we ought to fix it.

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

No branches or pull requests

2 participants