Skip to content

yield tests are deprecated in pytest #10728

@qinhanmin2014

Description

@qinhanmin2014

yield tests are deprecated in pytest and we are getting many warnings in test logs, See e.g.

sklearn/datasets/tests/test_svmlight_format.py::test_load_with_offsets
  yield tests are deprecated, and scheduled to be removed in pytest 4.0
sklearn/decomposition/tests/test_online_lda.py::test_verbosity
  yield tests are deprecated, and scheduled to be removed in pytest 4.0
sklearn/decomposition/tests/test_pca.py::test_pca_dtype_preservation
  yield tests are deprecated, and scheduled to be removed in pytest 4.0
sklearn/ensemble/tests/test_forest.py::test_classification_toy
  yield tests are deprecated, and scheduled to be removed in pytest 4.0
sklearn/ensemble/tests/test_forest.py::test_iris
  yield tests are deprecated, and scheduled to be removed in pytest 4.0

I think we should get rid of yield.
See pytest-dev/pytest#1714
ping @jnothman @lesteve

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions