broad-monkey-41613
11/19/2021, 11:48 PMplatform darwin -- Python 3.6.5, pytest-6.2.5, py-1.10.0, pluggy-1.0.0
rootdir: /private/var/folders/t2/h7w2qkz95jj9pwg9w87q7tc00000gp/T/process-executionRbwpkq
plugins: cov-3.0.0
collected 0 items / 1 error
==================================== ERRORS ====================================
_ ERROR collecting python/monitor_spot_instances/tests/test_monitor_spot_instances.py _
ImportError while importing test module '/private/var/folders/t2/h7w2qkz95jj9pwg9w87q7tc00000gp/T/process-executionRbwpkq/python/monitor_spot_instances/tests/test_monitor_spot_instances.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/Users/cris/.pyenv/versions/3.6.5/lib/python3.6/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
python/monitor_spot_instances/tests/test_monitor_spot_instances.py:4: in <module>
import boto3
E ModuleNotFoundError: No module named 'boto3'
- generated xml file: /private/var/folders/t2/h7w2qkz95jj9pwg9w87q7tc00000gp/T/process-executionRbwpkq/python.monitor_spot_instances.tests.test_monitor_spot_instances.py.xml -
=========================== short test summary info ============================
ERROR python/monitor_spot_instances/tests/test_monitor_spot_instances.py
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
=============================== 1 error in 0.15s ===============================
š python/monitor_spot_instances/tests/test_monitor_spot_instances.py failed.
All my requirements (boto
) reside within the monitor_spot_instances
directory and have a BUILD
file with python_requirements()
generated in itpolite-garden-50641
11/20/2021, 12:02 AM./pants dependencies python/monitor_spot_instances/tests/test_monitor_spot_instances.py
to see a list of dependencies for this test as pants sees them.polite-garden-50641
11/20/2021, 12:03 AMhappy-kitchen-89482
11/20/2021, 12:09 AMimport boto3
?broad-monkey-41613
11/20/2021, 12:10 AMboto3
client callsbroad-monkey-41613
11/20/2021, 12:10 AMboto3
happy-kitchen-89482
11/20/2021, 12:11 AMbroad-monkey-41613
11/20/2021, 12:11 AMhappy-kitchen-89482
11/20/2021, 12:11 AMpython_requirements()
target in the same directory as the requirements.txt
it wrapshappy-kitchen-89482
11/20/2021, 12:11 AMbroad-monkey-41613
11/20/2021, 12:12 AMmonitor_spot_instances
has the requirements.txt
and also holds the python_requirements()
broad-monkey-41613
11/20/2021, 12:13 AMsrc
and test
folder with python_sources
and python_tests
respectivelyhappy-kitchen-89482
11/20/2021, 12:15 AMhappy-kitchen-89482
11/20/2021, 12:15 AMrequirements.txt
in your repo? Do they also contain boto3?happy-kitchen-89482
11/20/2021, 12:16 AMbroad-monkey-41613
11/20/2021, 12:17 AMbroad-monkey-41613
11/20/2021, 12:18 AMbroad-monkey-41613
11/20/2021, 12:18 AMInstead, use `python_sources`, which behaves the same. Run `./pants update-build-files` to automatically fix your BUILD files.
16:11:51.06 [WARN] The target python/monitor_spot_instances/tests/test_monitor_spot_instances.py imports `boto3`, but Pants cannot safely infer a dependency because more than one target owns this module, so it is ambiguous which to use: ['python/aws_config_compliance:boto3', 'python/hs_pending_instance_lambda:boto3', 'python/mongodb_atlas_audit_logs:boto3', 'python/monitor_spot_instances/src:boto3', 'python/monitor_spot_instances/tests:boto3', 'python/monitor_spot_instances:boto3'].
broad-monkey-41613
11/20/2021, 12:21 AMbroad-monkey-41613
11/20/2021, 12:21 AMbroad-monkey-41613
11/20/2021, 12:23 AMpython_requirements()
in the subproject root folder as well as the src
and tests
folderbroad-monkey-41613
11/20/2021, 12:23 AM./pants dependenciesā¦
the tests worked. also did a ./pants update-build-files
broad-monkey-41613
11/20/2021, 12:24 AMhappy-kitchen-89482
11/20/2021, 1:01 AM