name: code run_id: commands[0] env LANG: C.UTF-8 env HOME: /home/jenkins env PATH: /w/workspace/ric-app-ad-tox-sonarqube/.tox/code/bin:/opt/pyenv/bin:/tmp/venv-mU5j/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 PYTHONHASHSEED: 1073731758 env PIP_DISABLE_PIP_VERSION_CHECK: 1 env PYTHONIOENCODING: utf-8 env LD_LIBRARY_PATH: /usr/local/lib/:/usr/local/lib64 env PYTHONPATH: /w/workspace/ric-app-ad-tox-sonarqube:src:/usr/lib/python3.7/site-packages/ env RMR_SEED_RT: tests/fixtures/test_local.rt env RMR_ASYNC_CONN: 0 env USE_FAKE_SDL: 1 env TOX_ENV_NAME: code env TOX_WORK_DIR: /w/workspace/ric-app-ad-tox-sonarqube/.tox env TOX_ENV_DIR: /w/workspace/ric-app-ad-tox-sonarqube/.tox/code env VIRTUAL_ENV: /w/workspace/ric-app-ad-tox-sonarqube/.tox/code env TOX_PACKAGE: /w/workspace/ric-app-ad-tox-sonarqube/.tox/.tmp/package/1/ad-1.0.1.tar.gz metadata pid: 2839 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-8.3.2, pluggy-1.5.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-5.0.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 /w/workspace/ric-app-ad-tox-sonarqube/src/processing.py:52: FutureWarning: ChainedAssignmentError: behaviour will change in pandas 3.0! You are setting values through chained assignment. Currently this works in certain cases, but when using Copy-on-Write (which will become the default behaviour in pandas 3.0) this will never work to update the original DataFrame or Series, because the intermediate object on which we are setting values will behave as a copy. A typical example is when you are setting values in a column of a DataFrame, like: df["col"][row_indexer] = value Use `df.loc[row_indexer, "col"] = values` instead, to perform the assignment in a single step and ensure this keeps updating the original `df`. See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy self.data.iloc[:]['DRB.UEThpDl'] = self.data['DRB.UEThpDl'].apply(lambda x: x*1024) -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ---------- 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, 2 warnings in 106.54s (0:01:46) ===================