From 96ca3be1f1ab6c69329b5c62456fd02bd6ac098f 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/dtypes/test_dtypes.py | 4 ++-- 2 files changed, 3 insertions(+), 8 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/dtypes/test_dtypes.py b/pandas/tests/dtypes/test_dtypes.py index 7fee7cbb1537bd..27ca833b179e94 100644 --- a/pandas/tests/dtypes/test_dtypes.py +++ b/pandas/tests/dtypes/test_dtypes.py @@ -356,12 +356,12 @@ def test_construction(self): def test_construction_generic(self): # generic i = IntervalDtype('interval') - assert i.subtype is None + assert (i.subtype is None) assert is_interval_dtype(i) assert str(i) == 'interval' i = IntervalDtype() - assert i.subtype is None + assert (i.subtype is None) assert is_interval_dtype(i) assert str(i) == 'interval'