MachineLearningStocks icon indicating copy to clipboard operation
MachineLearningStocks copied to clipboard

Error en pytest -v

Open jordisanchezcarbonell opened this issue 6 years ago • 1 comments
trafficstars

tests/test_datasets.py::test_forward_sample_dimensions PASSED [ 11%] tests/test_datasets.py::test_forward_sample_data PASSED [ 22%] tests/test_datasets.py::test_stock_prices_dataset PASSED [ 33%] tests/test_datasets.py::test_stock_prediction_dataset PASSED [ 44%] tests/test_utils.py::test_status_calc PASSED [ 55%] tests/test_utils.py::test_data_string_to_float PASSED [ 66%] tests/test_variables.py::test_statspath PASSED [ 77%] tests/test_variables.py::test_features_same FAILED [ 88%] tests/test_variables.py::test_outperformance PASSED [100%]

=================================================== FAILURES ==================================================== ______________________________________________ test_features_same _______________________________________________

def test_features_same():
    # There are only four differences (intentionally)
  assert set(parsing_keystats.features) - set(current_data.features) == {'Net Income Avl to Common', 'Qtrly Earnings Growth',
                                                                           'Qtrly Revenue Growth', 'Shares Short (as of',
                                                                           'Shares Short (prior month)'}

E AssertionError: assert {'Net Income ...Short (as of'} == {'Net Income A...prior month)'} E Extra items in the right set: E 'Shares Short (prior month)' E Full diff: E {'Net Income Avl to Common', E 'Qtrly Earnings Growth', E 'Qtrly Revenue Growth', E - 'Shares Short (as of'}... E
E ...Full output truncated (5 lines hidden), use '-vv' to show

tests/test_variables.py:17: AssertionError ====================================== 1 failed, 8 passed in 11.06 seconds ======================================

jordisanchezcarbonell avatar Jul 10 '19 14:07 jordisanchezcarbonell

Change parsing_keystats.py as below, re-run everything, that should fix the bug:

@@ -54,7 +54,7 @@ features = [ # Valuation measures "Shares Short (as of", "Short Ratio", "Short % of Float",

  • "Shares Short (prior month",
  • "Shares Short (prior month)",

xiang-burlington avatar Jun 28 '20 20:06 xiang-burlington