Skip to content

Commit

Permalink
DOC: Update documentation for TestCase usage
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
gfyoung committed May 2, 2017
1 parent 8d63290 commit 96ca3be
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
7 changes: 1 addition & 6 deletions doc/source/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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``
~~~~~~~~~~~~~~~~
Expand Down
4 changes: 2 additions & 2 deletions pandas/tests/dtypes/test_dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down

0 comments on commit 96ca3be

Please sign in to comment.