Closed mksanger closed 3 years ago
What's the best way to run these locally? I've tried
cd
ing togitlab_test
and runningpytest
:
I'll add something to make this more clear, it needs to be run as a module, python -m pytest
. That adds gitlab_test
to the path.
There's a few lines longer than PEP8 would like (PEP 8: E501 line too long (89 > 79 characters))
Fails with No module named 'networkx'
so needs requirements fo that too.
Fails with No module named 'networkx'
so needs requirements fo that too.
gitlab_test$ python -m pytest .
================================================================= test session starts =================================================================
platform linux -- Python 3.9.5, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
rootdir: /home/keith/dev/work/cloud/npg_conda/tools/automation/gitlab_test, configfile: pytest.ini
plugins: mock-3.6.1
collected 6 items / 1 error / 5 selected
======================================================================= ERRORS ========================================================================
___________________________________________________________ ERROR collecting gitlab_test.py ___________________________________________________________
gitlab_test.py:34: in <module>
args = parser.parse_args()
/home/keith/.local/miniconda/envs/npg_conda/lib/python3.9/argparse.py:1821: in parse_args
self.error(msg % ' '.join(argv))
/home/keith/.local/miniconda/envs/npg_conda/lib/python3.9/argparse.py:2575: in error
self.exit(2, _('%(prog)s: error: %(message)s\n') % args)
/home/keith/.local/miniconda/envs/npg_conda/lib/python3.9/argparse.py:2562: in exit
_sys.exit(status)
E SystemExit: 2
------------------------------------------------------------------- Captured stderr -------------------------------------------------------------------
usage: __main__.py [-h] [-b BUILD_DIR] [-c CHANGES] [-p PROD_CHANNEL]
[-d DEVEL_CHANNEL]
__main__.py: error: unrecognized arguments: .
================================================================== warnings summary ===================================================================
../../../../../../../.local/miniconda/envs/npg_conda/lib/python3.9/site-packages/conda/_vendor/auxlib/_vendor/five.py:49
/home/keith/.local/miniconda/envs/npg_conda/lib/python3.9/site-packages/conda/_vendor/auxlib/_vendor/five.py:49: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
from imp import reload # noqa
-- Docs: https://docs.pytest.org/en/stable/warnings.html
=============================================================== short test summary info ===============================================================
ERROR gitlab_test.py - SystemExit: 2
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
============================================================= 1 warning, 1 error in 0.70s =============================================================
gitlab_test$ python -m pytest .
I didn't mean to edit it... without the .
should work, including that makes it try to run gitlab_test.py
, which obviously fails due to not having any arguments. Any ideas for a name for that script that doesn't include the word test?
What's the best way to run these locally? I've tried
cd
ing togitlab_test
and runningpytest
: