Closed yosukesan closed 1 year ago
Checked succesfull temination of tests. Thanks.
docker run --name tests_pypfopt -t pypfopt bash -c 'pip install pytest && pytest'
Collecting pytest
Downloading pytest-7.3.1-py3-none-any.whl (320 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 320.5/320.5 kB 2.9 MB/s eta 0:00:00
Collecting iniconfig (from pytest)
Downloading iniconfig-2.0.0-py3-none-any.whl (5.9 kB)
Requirement already satisfied: packaging in /usr/local/lib/python3.11/site-packages (from pytest) (23.1)
Collecting pluggy<2.0,>=0.12 (from pytest)
Downloading pluggy-1.0.0-py2.py3-none-any.whl (13 kB)
Installing collected packages: pluggy, iniconfig, pytest
Successfully installed iniconfig-2.0.0 pluggy-1.0.0 pytest-7.3.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
========================================================================== test session starts ==========================================================================
platform linux -- Python 3.11.3, pytest-7.3.1, pluggy-1.0.0
rootdir: /pypfopt
collected 312 items
tests/test_base_optimizer.py ................... [ 6%]
tests/test_black_litterman.py ..................... [ 12%]
tests/test_cla.py ............ [ 16%]
tests/test_custom_objectives.py .................. [ 22%]
tests/test_discrete_allocation.py ................. [ 27%]
tests/test_efficient_cdar.py .................... [ 34%]
tests/test_efficient_cvar.py ..................... [ 41%]
tests/test_efficient_frontier.py .......................................................................... [ 64%]
tests/test_efficient_semivariance.py ............................ [ 73%]
tests/test_expected_returns.py ................... [ 79%]
tests/test_hrp.py ...... [ 81%]
tests/test_imports.py ... [ 82%]
tests/test_objective_functions.py ........... [ 86%]
tests/test_plotting.py ................. [ 91%]
tests/test_risk_models.py .......................... [100%]
=========================================================================== warnings summary ============================================================================
pypfopt/plotting.py:21
/pypfopt/pypfopt/plotting.py:21: MatplotlibDeprecationWarning: The seaborn styles shipped by Matplotlib are deprecated since 3.6, as they no longer correspond to the styles shipped by seaborn. However, they will remain available as 'seaborn-v0_8-<style>'. Alternatively, directly use the seaborn API instead.
plt.style.use("seaborn-deep")
tests/test_base_optimizer.py::test_exception_immutability
/pypfopt/pypfopt/efficient_frontier/efficient_frontier.py:175: RuntimeWarning: Market neutrality requires shorting - bounds have been amended
warnings.warn(
tests/test_black_litterman.py: 10 warnings
/pypfopt/pypfopt/black_litterman.py:257: UserWarning: Running Black-Litterman with no prior.
warnings.warn("Running Black-Litterman with no prior.")
tests/test_discrete_allocation.py: 9 warnings
tests/test_efficient_cvar.py: 1 warning
tests/test_efficient_semivariance.py: 2 warnings
tests/test_plotting.py: 4 warnings
/usr/local/lib/python3.11/site-packages/cvxpy/problems/problem.py:1385: UserWarning: Solution may be inaccurate. Try another solver, adjusting the solver settings, or solve with verbose=True for more information.
warnings.warn(
tests/test_efficient_frontier.py::test_min_volatility_sector_constraints
/pypfopt/pypfopt/base_optimizer.py:396: UserWarning: Sector constraints may not produce reasonable results if shorts are allowed.
warnings.warn(
tests/test_efficient_frontier.py::test_max_sharpe_L2_reg_different_gamma
tests/test_efficient_frontier.py::test_max_sharpe_L2_reg_different_gamma
tests/test_efficient_frontier.py::test_max_sharpe_L2_reg_reduces_sharpe
tests/test_efficient_frontier.py::test_max_sharpe_L2_reg_with_shorts
/pypfopt/pypfopt/efficient_frontier/efficient_frontier.py:262: UserWarning: max_sharpe transforms the optimization problem so additional objectives may not work as expected.
warnings.warn(
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
============================================================== 312 passed, 33 warnings in 83.32s (0:01:23) ==============================================================
Host env
Test command
Test log