Skip to content

Commit fa7bdd9

Browse files
committed
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.
1 parent b11bd87 commit fa7bdd9

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

doc/source/contributing.rst

+1-6
Original file line numberDiff line numberDiff line change
@@ -633,12 +633,7 @@ framework that will facilitate testing and developing. Thus, instead of writing
633633
....
634634
635635
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
636-
using test classes allows for better organization. However, instead of inheriting from ``tm.TestCase``, we should just inherit from ``object``:
637-
638-
.. code-block:: python
639-
640-
class TestReallyCoolFeature(object):
641-
....
636+
using test classes allows for better organization. If test classes are used, make sure that they do inherit from ``tm.TestCase``.
642637

643638
Using ``pytest``
644639
~~~~~~~~~~~~~~~~

pandas/tests/test_algos.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ def test_complex_sorting(self):
282282
# gh 12666 - check no segfault
283283
# Test not valid numpy versions older than 1.11
284284
if pd._np_version_under1p11:
285-
self.skipTest("Test valid only for numpy 1.11+")
285+
pytest.skip("Test valid only for numpy 1.11+")
286286

287287
x17 = np.array([complex(i) for i in range(17)], dtype=object)
288288

0 commit comments

Comments
 (0)