From 51eab8c8c3e7c48c4a6b62759ee0029a7d013aa8 Mon Sep 17 00:00:00 2001 From: gfyoung Date: Tue, 2 May 2017 12:24:54 -0400 Subject: [PATCH] DOC: Update documentation for TestCase usage tm.TestCase no longer follows the nosetest idiom, so it is here to stay, so update the documentation to say that we are using it still. Closes gh-15990. --- doc/source/contributing.rst | 7 +------ pandas/tests/test_algos.py | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/doc/source/contributing.rst b/doc/source/contributing.rst index 08e28582e7469d..d304d21c5c4577 100644 --- a/doc/source/contributing.rst +++ b/doc/source/contributing.rst @@ -633,12 +633,7 @@ framework that will facilitate testing and developing. Thus, instead of writing .... Sometimes, it does make sense to bundle test functions together into a single class, either because the test file is testing multiple functions from a single module, and -using test classes allows for better organization. However, instead of inheriting from ``tm.TestCase``, we should just inherit from ``object``: - -.. code-block:: python - - class TestReallyCoolFeature(object): - .... +using test classes allows for better organization. If test classes are used, make sure that they do inherit from ``tm.TestCase``. Using ``pytest`` ~~~~~~~~~~~~~~~~ diff --git a/pandas/tests/test_algos.py b/pandas/tests/test_algos.py index 86d9ab3643cc93..dda95426d80117 100644 --- a/pandas/tests/test_algos.py +++ b/pandas/tests/test_algos.py @@ -282,7 +282,7 @@ def test_complex_sorting(self): # gh 12666 - check no segfault # Test not valid numpy versions older than 1.11 if pd._np_version_under1p11: - self.skipTest("Test valid only for numpy 1.11+") + pytest.skip("Test valid only for numpy 1.11+") x17 = np.array([complex(i) for i in range(17)], dtype=object)