Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lots of warnings when running test suite #111

Closed
sgibson91 opened this issue May 29, 2019 · 7 comments
Closed

Lots of warnings when running test suite #111

sgibson91 opened this issue May 29, 2019 · 7 comments
Assignees

Comments

@sgibson91
Copy link

While replicating #109, I noticed a lot of warnings logged from the command python3 -m pytest -v. They are a mixture of DeprecationWarnings and RemovedInPytest4Warnings.

I've pasted the output below the fold so we can track which packages need updating.

Output
/Users/sgibson/anaconda3/lib/python3.7/site-packages/matplotlib/rcsetup.py:20: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  from collections import Iterable, Mapping

/Users/sgibson/anaconda3/lib/python3.7/site-packages/matplotlib/colors.py:53: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  from collections import Sized

/Users/sgibson/anaconda3/lib/python3.7/site-packages/_pytest/python.py:197: RemovedInPytest4Warning: Fixture "subject_residuals" called directly. Fixtures are not meant to be called directly, are created automatically when test functions request them as parameters. See https://docs.pytest.org/en/latest/fixture.html for more information.
  testfunction(**testargs)

/Users/sgibson/scona/tests/make_corr_matrices_test.py:38: RemovedInPytest4Warning: Fixture "subject_array" called directly. Fixtures are not meant to be called directly, are created automatically when test functions request them as parameters. See https://docs.pytest.org/en/latest/fixture.html for more information.
  subject_array()[:, i]) for i in [0, 1]]
/Users/sgibson/scona/tests/make_corr_matrices_test.py:38: RemovedInPytest4Warning: Fixture "subject_array" called directly. Fixtures are not meant to be called directly, are created automatically when test functions request them as parameters. See https://docs.pytest.org/en/latest/fixture.html for more information.
  subject_array()[:, i]) for i in [0, 1]]
/Users/sgibson/scona/tests/make_corr_matrices_test.py:38: RemovedInPytest4Warning: Fixture "subject_array" called directly. Fixtures are not meant to be called directly, are created automatically when test functions request them as parameters. See https://docs.pytest.org/en/latest/fixture.html for more information.
  subject_array()[:, i]) for i in [0, 1]]
/Users/sgibson/scona/tests/make_corr_matrices_test.py:38: RemovedInPytest4Warning: Fixture "subject_array" called directly. Fixtures are not meant to be called directly, are created automatically when test functions request them as parameters. See https://docs.pytest.org/en/latest/fixture.html for more information.
  subject_array()[:, i]) for i in [0, 1]]
/Users/sgibson/anaconda3/lib/python3.7/site-packages/_pytest/python.py:197: RemovedInPytest4Warning: Fixture "subject_data" called directly. Fixtures are not meant to be called directly, are created automatically when test functions request them as parameters. See https://docs.pytest.org/en/latest/fixture.html for more information.
  testfunction(**testargs)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/_pytest/fixtures.py:977: RemovedInPytest4Warning: Fixture "subject_array" called directly. Fixtures are not meant to be called directly, are created automatically when test functions request them as parameters. See https://docs.pytest.org/en/latest/fixture.html for more information.
  return function(*args, **kwargs)
/Users/sgibson/scona/scona/make_corr_matrices.py:63: DeprecationWarning: The truth value of an empty array is ambiguous. Returning False, but in future this will result in an error. Use `array.size > 0` to check that an array is not empty.
  if non_numeric_cols:

/Users/sgibson/scona/tests/make_corr_matrices_test.py:47: RemovedInPytest4Warning: Fixture "subject_array" called directly. Fixtures are not meant to be called directly, are created automatically when test functions request them as parameters. See https://docs.pytest.org/en/latest/fixture.html for more information.
  subject_array()[:, i]) for i in [0, 1]]
/Users/sgibson/scona/tests/make_corr_matrices_test.py:47: RemovedInPytest4Warning: Fixture "subject_array" called directly. Fixtures are not meant to be called directly, are created automatically when test functions request them as parameters. See https://docs.pytest.org/en/latest/fixture.html for more information.
  subject_array()[:, i]) for i in [0, 1]]
/Users/sgibson/scona/tests/make_corr_matrices_test.py:47: RemovedInPytest4Warning: Fixture "subject_array" called directly. Fixtures are not meant to be called directly, are created automatically when test functions request them as parameters. See https://docs.pytest.org/en/latest/fixture.html for more information.
  subject_array()[:, i]) for i in [0, 1]]
/Users/sgibson/scona/tests/make_corr_matrices_test.py:47: RemovedInPytest4Warning: Fixture "subject_array" called directly. Fixtures are not meant to be called directly, are created automatically when test functions request them as parameters. See https://docs.pytest.org/en/latest/fixture.html for more information.
  subject_array()[:, i]) for i in [0, 1]]
/Users/sgibson/anaconda3/lib/python3.7/site-packages/_pytest/python.py:197: RemovedInPytest4Warning: Fixture "subject_data" called directly. Fixtures are not meant to be called directly, are created automatically when test functions request them as parameters. See https://docs.pytest.org/en/latest/fixture.html for more information.
  testfunction(**testargs)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/_pytest/fixtures.py:977: RemovedInPytest4Warning: Fixture "subject_array" called directly. Fixtures are not meant to be called directly, are created automatically when test functions request them as parameters. See https://docs.pytest.org/en/latest/fixture.html for more information.
  return function(*args, **kwargs)
/Users/sgibson/scona/scona/make_corr_matrices.py:63: DeprecationWarning: The truth value of an empty array is ambiguous. Returning False, but in future this will result in an error. Use `array.size > 0` to check that an array is not empty.
  if non_numeric_cols:

/Users/sgibson/scona/tests/make_corr_matrices_test.py:56: RemovedInPytest4Warning: Fixture "subject_array" called directly. Fixtures are not meant to be called directly, are created automatically when test functions request them as parameters. See https://docs.pytest.org/en/latest/fixture.html for more information.
  for i in [0, 1]]
/Users/sgibson/scona/tests/make_corr_matrices_test.py:56: RemovedInPytest4Warning: Fixture "subject_array" called directly. Fixtures are not meant to be called directly, are created automatically when test functions request them as parameters. See https://docs.pytest.org/en/latest/fixture.html for more information.
  for i in [0, 1]]
/Users/sgibson/scona/tests/make_corr_matrices_test.py:56: RemovedInPytest4Warning: Fixture "subject_array" called directly. Fixtures are not meant to be called directly, are created automatically when test functions request them as parameters. See https://docs.pytest.org/en/latest/fixture.html for more information.
  for i in [0, 1]]
/Users/sgibson/scona/tests/make_corr_matrices_test.py:56: RemovedInPytest4Warning: Fixture "subject_array" called directly. Fixtures are not meant to be called directly, are created automatically when test functions request them as parameters. See https://docs.pytest.org/en/latest/fixture.html for more information.
  for i in [0, 1]]
/Users/sgibson/anaconda3/lib/python3.7/site-packages/_pytest/python.py:197: RemovedInPytest4Warning: Fixture "subject_data" called directly. Fixtures are not meant to be called directly, are created automatically when test functions request them as parameters. See https://docs.pytest.org/en/latest/fixture.html for more information.
  testfunction(**testargs)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/_pytest/fixtures.py:977: RemovedInPytest4Warning: Fixture "subject_array" called directly. Fixtures are not meant to be called directly, are created automatically when test functions request them as parameters. See https://docs.pytest.org/en/latest/fixture.html for more information.
  return function(*args, **kwargs)
/Users/sgibson/scona/scona/make_corr_matrices.py:63: DeprecationWarning: The truth value of an empty array is ambiguous. Returning False, but in future this will result in an error. Use `array.size > 0` to check that an array is not empty.
  if non_numeric_cols:

/Users/sgibson/anaconda3/lib/python3.7/site-packages/_pytest/python.py:197: RemovedInPytest4Warning: Fixture "subject_residuals" called directly. Fixtures are not meant to be called directly, are created automatically when test functions request them as parameters. See https://docs.pytest.org/en/latest/fixture.html for more information.
  testfunction(**testargs)
/Users/sgibson/scona/scona/make_corr_matrices.py:121: DeprecationWarning: The truth value of an empty array is ambiguous. Returning False, but in future this will result in an error. Use `array.size > 0` to check that an array is not empty.
  if non_numeric_cols:

/Users/sgibson/anaconda3/lib/python3.7/site-packages/_pytest/python.py:197: RemovedInPytest4Warning: Fixture "subject_residuals" called directly. Fixtures are not meant to be called directly, are created automatically when test functions request them as parameters. See https://docs.pytest.org/en/latest/fixture.html for more information.
  testfunction(**testargs)
/Users/sgibson/scona/scona/make_corr_matrices.py:121: DeprecationWarning: The truth value of an empty array is ambiguous. Returning False, but in future this will result in an error. Use `array.size > 0` to check that an array is not empty.
  if non_numeric_cols:

/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)

/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)

/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)

/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)

/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)

/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)

/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)

/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)

/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)

/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)

/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)

/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)

/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)
/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)

/Users/sgibson/anaconda3/lib/python3.7/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
  warnings.warn(msg, DeprecationWarning)

/Users/sgibson/scona/scona/make_corr_matrices.py:63: DeprecationWarning: The truth value of an empty array is ambiguous. Returning False, but in future this will result in an error. Use `array.size > 0` to check that an array is not empty.
  if non_numeric_cols:
/Users/sgibson/scona/scona/make_corr_matrices.py:121: DeprecationWarning: The truth value of an empty array is ambiguous. Returning False, but in future this will result in an error. Use `array.size > 0` to check that an array is not empty.
  if non_numeric_cols:

-- Docs: https://docs.pytest.org/en/latest/warnings.html
@sgibson91
Copy link
Author

sgibson91 commented May 29, 2019

For the record, I am using:

anaconda Command line client (version 1.7.2)
Python 3.7.0

I've noticed in other issues that this repo is pinning to python 3.6 for Binder. Will set up an env for 3.6 and see if I get the same output.

@sgibson91
Copy link
Author

sgibson91 commented May 29, 2019

So, mixed results to setting up an environment.

Here's what I did:

conda create --name scona python=3.6
pip install git+https://github.com/WhitakerLab/scona.git
pip install -r requirements  # had to run this otherwise pytest wasn't installed

The amount of warnings were greatly reduced!

Warnings output
  /Users/sgibson/anaconda3/envs/scona/lib/python3.6/site-packages/networkx/classes/graph.py:766: DeprecationWarning: add_path is deprecated. Use nx.add_path instead.
    warnings.warn(msg, DeprecationWarning)

tests/regression_test.py::FixturesTest::test_corrmat_matches_fixture
  /Users/sgibson/scona/scona/make_corr_matrices.py:63: DeprecationWarning: The truth value of an empty array is ambiguous. Returning False, but in future this will result in an error. Use `array.size > 0` to check that an array is not empty.
    if non_numeric_cols:

tests/regression_test.py::FixturesTest::test_corrmat_matches_fixture
  /Users/sgibson/scona/scona/make_corr_matrices.py:121: DeprecationWarning: The truth value of an empty array is ambiguous. Returning False, but in future this will result in an error. Use `array.size > 0` to check that an array is not empty.
    if non_numeric_cols:

But now 7 tests are failing instead of 1:

  • test_non_numeric_cols

Fixture "subject_residuals" called directly. Fixtures are not meant to be called directly,
but are created automatically when test functions request them as parameters.
See https://docs.pytest.org/en/latest/fixture.html for more information about fixtures, and
https://docs.pytest.org/en/latest/deprecations.html#calling-fixtures-directly about how to update your code.

  • test_create_residuals_df_covars_plural

Fixture "subject_array" called directly. Fixtures are not meant to be called directly,
but are created automatically when test functions request them as parameters.
See https://docs.pytest.org/en/latest/fixture.html for more information about fixtures, and
https://docs.pytest.org/en/latest/deprecations.html#calling-fixtures-directly about how to update your code.

  • test_create_residuals_df_covars_singular

Fixture "subject_array" called directly. Fixtures are not meant to be called directly,
but are created automatically when test functions request them as parameters.
See https://docs.pytest.org/en/latest/fixture.html for more information about fixtures, and
https://docs.pytest.org/en/latest/deprecations.html#calling-fixtures-directly about how to update your code.
*test_create_residuals_df_covars_none
Fixture "subject_array" called directly. Fixtures are not meant to be called directly,
but are created automatically when test functions request them as parameters.
See https://docs.pytest.org/en/latest/fixture.html for more information about fixtures, and
https://docs.pytest.org/en/latest/deprecations.html#calling-fixtures-directly about how to update your code.

  • test_create_corrmat_pearson

Fixture "subject_residuals" called directly. Fixtures are not meant to be called directly,
but are created automatically when test functions request them as parameters.
See https://docs.pytest.org/en/latest/fixture.html for more information about fixtures, and
https://docs.pytest.org/en/latest/deprecations.html#calling-fixtures-directly about how to update your code.

  • test_create_corrmat_spearman

Fixture "subject_residuals" called directly. Fixtures are not meant to be called directly,
but are created automatically when test functions request them as parameters.
See https://docs.pytest.org/en/latest/fixture.html for more information about fixtures, and
https://docs.pytest.org/en/latest/deprecations.html#calling-fixtures-directly about how to update your code.

  • FixturesTest.test_lm_against_fixture
self = <tests.regression_test.FixturesTest testMethod=test_lm_against_fixture>

    def test_lm_against_fixture(self):
        # test new local measures against fixture
        print('\ntesting new nodal measures against fixture')
        self.assertEqual(self.hash_dict_new[self.lm],
>                        self.hash_dict_original[self.lm])
E       AssertionError: '3ce452749b52e3a60b7779ffe3c43e1de8219cb42715aeabd28b94363b59e9bb' != 'dc585cb573b87b1099c034f7c6991c410fca3f6878541e3caa2c7ac0816957dc'
E       - 3ce452749b52e3a60b7779ffe3c43e1de8219cb42715aeabd28b94363b59e9bb
E       + dc585cb573b87b1099c034f7c6991c410fca3f6878541e3caa2c7ac0816957dc

tests/regression_test.py:37: AssertionError

@wingedRuslan
Copy link
Collaborator

wingedRuslan commented May 29, 2019

Hi @sgibson91!

Are the following tests passed when you run them locally?

  • FixturesTest.test_rich_against_fixture
  • FixturesTest.test_lm_against_fixture
  • FixturesTest.test_gm_against_fixture

When I tried running tests, 3/4 tests from regresstion_test.py module failed. Only FixturesTest::test_corrmat_matches_fixture passed.

@sgibson91
Copy link
Author

sgibson91 commented May 29, 2019

Hi @wingedRuslan !

  • FixturesTest.test_rich_against_fixture ✅
  • FixturesTest.test_lm_against_fixture 🚫
  • FixturesTest.test_gm_against_fixture ✅

@Islast
Copy link
Collaborator

Islast commented May 29, 2019

@sgibson91 I think the extra 6 failing tests are mostly due to me abusing pytest (because when I wrote the earliest tests in scona I had no idea what I was doing). Ideally I will be able to fix this so that it makes sense in 3.6 or 3.7

re the warnings, I am seeing the same three things popping up over and over again:

  • fixtures are not meant to be called directly (again, abusing pytest)
  • Use array.size > 0 to check that an array is not empty.
  • add_path is deprecated. Use nx.add_path instead
    fortunately these are all pretty easy to fix

I will self assign and iron these out, thanks for the detective work 🕵️‍♀️

@Islast Islast self-assigned this May 29, 2019
@Islast
Copy link
Collaborator

Islast commented Jun 14, 2019

I've made some changes in the pytestwarnings branch. For me all warnings have disappeared (although the failing tests still fail)

@Islast Islast mentioned this issue Jul 11, 2019
1 task
@Islast
Copy link
Collaborator

Islast commented Dec 12, 2019

closing

@Islast Islast closed this as completed Dec 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants