Some modules missing in requirements-tests.txt
Opened this issue · 5 comments
Tests runs do require the some packages when run
======================================================================
ERROR: Failure: ModuleNotFoundError (No module named 'responses')
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/lily/projects/shavar-env/lib/python3.6/site-packages/nose/failure.py", line 39, in runTest
raise self.exc_val.with_traceback(self.tb)
File "/home/lily/projects/shavar-env/lib/python3.6/site-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/home/lily/projects/shavar-env/lib/python3.6/site-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/home/lily/projects/shavar-env/lib/python3.6/site-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/usr/lib/python3.6/imp.py", line 235, in load_module
return load_source(name, filename, file)
File "/usr/lib/python3.6/imp.py", line 172, in load_source
module = _load(spec)
File "<frozen importlib._bootstrap>", line 684, in _load
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/lily/projects/shavar/shavar/tests/test_lists.py", line 3, in <module>
import responses
ModuleNotFoundError: No module named 'responses'
======================================================================
ERROR: Failure: ModuleNotFoundError (No module named 'pyramid')
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/lily/projects/shavar-env/lib/python3.6/site-packages/nose/failure.py", line 39, in runTest
raise self.exc_val.with_traceback(self.tb)
File "/home/lily/projects/shavar-env/lib/python3.6/site-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/home/lily/projects/shavar-env/lib/python3.6/site-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/home/lily/projects/shavar-env/lib/python3.6/site-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/usr/lib/python3.6/imp.py", line 235, in load_module
return load_source(name, filename, file)
File "/usr/lib/python3.6/imp.py", line 172, in load_source
module = _load(spec)
File "<frozen importlib._bootstrap>", line 684, in _load
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/lily/projects/shavar/shavar/tests/test_parse.py", line 15, in <module>
from shavar.tests.base import (
File "/home/lily/projects/shavar/shavar/tests/base.py", line 5, in <module>
from pyramid import testing
ModuleNotFoundError: No module named 'pyramid'
======================================================================
ERROR: Failure: ModuleNotFoundError (No module named 'moto')
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/lily/projects/shavar-env/lib/python3.6/site-packages/nose/failure.py", line 39, in runTest
raise self.exc_val.with_traceback(self.tb)
File "/home/lily/projects/shavar-env/lib/python3.6/site-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/home/lily/projects/shavar-env/lib/python3.6/site-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/home/lily/projects/shavar-env/lib/python3.6/site-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/usr/lib/python3.6/imp.py", line 235, in load_module
return load_source(name, filename, file)
File "/usr/lib/python3.6/imp.py", line 172, in load_source
module = _load(spec)
File "<frozen importlib._bootstrap>", line 684, in _load
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/lily/projects/shavar/shavar/tests/test_sources.py", line 8, in <module>
from moto import mock_s3_deprecated as mock_s3
ModuleNotFoundError: No module named 'moto'
======================================================================
ERROR: Failure: ModuleNotFoundError (No module named 'swagger_parser')
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/lily/projects/shavar-env/lib/python3.6/site-packages/nose/failure.py", line 39, in runTest
raise self.exc_val.with_traceback(self.tb)
File "/home/lily/projects/shavar-env/lib/python3.6/site-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/home/lily/projects/shavar-env/lib/python3.6/site-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/home/lily/projects/shavar-env/lib/python3.6/site-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/usr/lib/python3.6/imp.py", line 235, in load_module
return load_source(name, filename, file)
File "/usr/lib/python3.6/imp.py", line 172, in load_source
module = _load(spec)
File "<frozen importlib._bootstrap>", line 684, in _load
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/lily/projects/shavar/shavar/tests/test_views.py", line 3, in <module>
from swagger_parser import SwaggerParser
ModuleNotFoundError: No module named 'swagger_parser'
----------------------------------------------------------------------
Ran 4 tests in 0.001s
Common missing packages
responses
pyramid
swagger-parser
I did find responses
and pyramid
in constraints.txt
as required however no swagger-parser
but used in shavar/tests/test_views.py
Worthy to note I used virtualenv
but not over the root. This might be related to #135
Hello @LilyLME. I wasn't able to reproduce this when following the instructions in the README. Did pip install -r requirements-test.txt
complete successfully before you attempted to run the tests? Could you please provide the exact steps you followed?
@boolean5 I did follow the normal steps, however I needed to install some of this packages with pip myself.
Perhaps I missed something.
But then, when you run tests did they pass? Did it ask for swagger-parser
at any point?
Yes, the tests are running fine. You shouldn't have to install dependencies manually. Running pip install -r requirements-test.txt
is supposed to install all the necessary dependencies. I suggest trying again from scratch and keeping an eye on the output of pip install -r requirements-test.txt
for any dependencies that fail to install.