name: code run_id: commands[0] env HOME: /home/jenkins env LANG: C.UTF-8 env LD_LIBRARY_PATH: /usr/local/lib/:/usr/local/lib64 env PATH: /w/workspace/ric-app-ad-tox-sonarqube/.tox/code/bin:/opt/pyenv/bin:/tmp/venv-8Qzb/bin:/opt/pyenv/shims:/home/jenkins/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/puppetlabs/bin env PIP_DISABLE_PIP_VERSION_CHECK: 1 env PIP_USER: 0 env PYTHONHASHSEED: 3115074300 env PYTHONIOENCODING: utf-8 env PYTHONPATH: /w/workspace/ric-app-ad-tox-sonarqube:src env RMR_ASYNC_CONN: 0 env RMR_SEED_RT: tests/fixtures/test_local.rt env SSH_AGENT_PID: 1648 env SSH_AUTH_SOCK: ******************************** env TOX_ENV_DIR: /w/workspace/ric-app-ad-tox-sonarqube/.tox/code env TOX_ENV_NAME: code env TOX_WORK_DIR: /w/workspace/ric-app-ad-tox-sonarqube/.tox env USE_FAKE_SDL: 1 env VIRTUAL_ENV: /w/workspace/ric-app-ad-tox-sonarqube/.tox/code env __TOX_ENVIRONMENT_VARIABLE_ORIGINAL_CI: true metadata pid: 2677 cwd: /w/workspace/ric-app-ad-tox-sonarqube allow: /w/workspace/ric-app-ad-tox-sonarqube/.tox/code/bin/* cmd: pytest -v --cov src --cov-report xml --cov-report term-missing --cov-report html --cov-fail-under=50 exit_code: 0 ============================= test session starts ============================== platform linux -- Python 3.10.6, pytest-9.1.1, pluggy-1.7.0 -- /w/workspace/ric-app-ad-tox-sonarqube/.tox/code/bin/python cachedir: .tox/code/.pytest_cache rootdir: /w/workspace/ric-app-ad-tox-sonarqube plugins: cov-7.1.0 collecting ... collected 4 items tests/test_ad.py::test_database_connection PASSED [ 25%] tests/test_ad.py::test_trainModel PASSED [ 50%] tests/test_ad.py::test_predict_anomaly PASSED [ 75%] tests/test_ad.py::test_msg_to_ts PASSED [100%] =============================== warnings summary =============================== tests/test_ad.py::test_trainModel tests/test_ad.py::test_trainModel tests/test_ad.py::test_trainModel tests/test_ad.py::test_predict_anomaly tests/test_ad.py::test_predict_anomaly tests/test_ad.py::test_predict_anomaly tests/test_ad.py::test_predict_anomaly tests/test_ad.py::test_predict_anomaly /w/workspace/ric-app-ad-tox-sonarqube/.tox/code/lib/python3.10/site-packages/pandas/core/dtypes/cast.py:1641: DeprecationWarning: np.find_common_type is deprecated. Please use `np.result_type` or `np.promote_types`. See https://numpy.org/devdocs/release/1.25.0-notes.html and the docs for more information. (Deprecated NumPy 1.25) return np.find_common_type(types, []) tests/test_ad.py::test_predict_anomaly /w/workspace/ric-app-ad-tox-sonarqube/src/main.py:111: DeprecationWarning: In a future version, `df.iloc[:, i] = newvals` will attempt to set the values inplace instead of always setting a new array. To retain the old behavior, use either `df[df.columns[i]] = newvals` or, if columns are non-unique, `df.isetitem(i, newvals)` df.loc[:, 'RRU.PrbUsedDl'] = df['RRU.PrbUsedDl'].astype('float') -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ================================ tests coverage ================================ _______________ coverage: platform linux, python 3.10.6-final-0 ________________ Name Stmts Miss Cover Missing ------------------------------------------------- src/__init__.py 0 0 100% src/ad_model.py 67 14 79% 42-43, 50-51, 57-58, 108-112, 121, 123, 125, 129 src/ad_train.py 69 6 91% 56-58, 66-68 src/database.py 94 34 64% 64-75, 85-97, 106-110, 113-118 src/exceptions.py 4 4 0% 18-25 src/insert.py 50 50 0% 21-84 src/main.py 116 65 44% 41-46, 70-83, 106-110, 119-130, 139, 146-163, 167-170, 174-177, 181-185, 190-192 src/processing.py 44 0 100% ------------------------------------------------- TOTAL 444 173 61% Coverage HTML written to dir htmlcov Coverage XML written to file coverage.xml Required test coverage of 50% reached. Total coverage: 61.04% ================== 4 passed, 9 warnings in 118.06s (0:01:58) ===================