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

[MRG] Fix test class to be runnable by pytest #9860

Merged
merged 1 commit into from
Oct 2, 2017

Conversation

lesteve
Copy link
Member

@lesteve lesteve commented Oct 2, 2017

Test class with __init__ is not run by pytest. I'll merge this one when the CIs are green.

More details (you need to edit setup.cfg to enable pytest warnings):

❯ pytest sklearn/neighbors/tests/test_dist_metrics.py -v
================================================ test session starts ================================================
platform linux -- Python 3.6.2, pytest-3.2.1, py-1.4.34, pluggy-0.4.0 -- /volatile/le243287/miniconda3/bin/python
cachedir: .cache
rootdir: /home/le243287/dev/alt-scikit-learn, inifile: setup.cfg
plugins: cov-2.3.1
collected 4 items                                                                                                    

sklearn/neighbors/tests/test_dist_metrics.py::test_haversine_metric PASSED
sklearn/neighbors/tests/test_dist_metrics.py::test_pyfunc_metric PASSED
sklearn/neighbors/tests/test_dist_metrics.py::test_bad_pyfunc_metric PASSED
sklearn/neighbors/tests/test_dist_metrics.py::test_input_data_size PASSED

================================================= warnings summary ==================================================
sklearn/neighbors/tests/test_dist_metrics.py::TestMetrics
  cannot collect test class 'TestMetrics' because it has a __init__ constructor

-- Docs: http://doc.pytest.org/en/latest/warnings.html
======================================= 4 passed, 1 warnings in 0.56 seconds ========================================

Test class with __init__ is not run by pytest
@lesteve lesteve merged commit dcaa267 into scikit-learn:master Oct 2, 2017
@lesteve lesteve deleted the fix-test-for-pytest branch October 2, 2017 08:19
maskani-moh pushed a commit to maskani-moh/scikit-learn that referenced this pull request Nov 15, 2017
Test class with __init__ is not run by pytest
jwjohnson314 pushed a commit to jwjohnson314/scikit-learn that referenced this pull request Dec 18, 2017
Test class with __init__ is not run by pytest
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

Successfully merging this pull request may close these issues.

1 participant