TST Replace unittest.TestCase.fail calls, use pytest.raises instead of legacy constructs
State: closed

Similarly to https://github.com/numpy/numpy/pull/11933,
> Following pytest migration there are unit tests that used to call unittest.TestCase.fail and now will produce a misleading error message on failure because the fail method no longer exists (test classes just inherit from object).
> 
> This fixes this issue, by raising an exception on failure explicitly.

In addition this uses `pytest.raises` instead of more complicated legacy constructions of the form,
```py
try:
   something
except ExceptedException:
   pass
else:
   raise AssertionError(error_message)
```
A few additional minor issues are discussed in comments below.

Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: Clean

Comments:
Hello @rth! Thanks for submitting the PR.

 - There are no PEP8 issues in the file [`pandas/tests/frame/test_indexing.py`](https://github.com/rth/pandas/blob/32b7b0fdd7280ff7d52aadfbfe275876f4f90a61/pandas/tests/frame/test_indexing.py) !

 - There are no PEP8 issues in the file [`pandas/tests/plotting/test_frame.py`](https://github.com/rth/pandas/blob/32b7b0fdd7280ff7d52aadfbfe275876f4f90a61/pandas/tests/plotting/test_frame.py) !

 - There are no PEP8 issues in the file [`pandas/tests/series/test_combine_concat.py`](https://github.com/rth/pandas/blob/32b7b0fdd7280ff7d52aadfbfe275876f4f90a61/pandas/tests/series/test_combine_concat.py) !

 - There are no PEP8 issues in the file [`pandas/tests/series/test_constructors.py`](https://github.com/rth/pandas/blob/32b7b0fdd7280ff7d52aadfbfe275876f4f90a61/pandas/tests/series/test_constructors.py) !

 - There are no PEP8 issues in the file [`pandas/tests/test_config.py`](https://github.com/rth/pandas/blob/32b7b0fdd7280ff7d52aadfbfe275876f4f90a61/pandas/tests/test_config.py) !


# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/22681?src=pr&el=h1) Report
> Merging [#22681](https://codecov.io/gh/pandas-dev/pandas/pull/22681?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/c04035360a179e82fc534cb4f38979615c53191f?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/22681/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/22681?src=pr&el=tree)

```diff
@@           Coverage Diff           @@
##           master   #22681   +/-   ##
=======================================
  Coverage   92.17%   92.17%           
=======================================
  Files         169      169           
  Lines       50715    50715           
=======================================
  Hits        46747    46747           
  Misses       3968     3968
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.58% <ø> (ø)` | :arrow_up: |
| #single | `42.35% <ø> (ø)` | :arrow_up: |


------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/22681?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/22681?src=pr&el=footer). Last update [c040353...56a0394](https://codecov.io/gh/pandas-dev/pandas/pull/22681?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

can you rebase on master, ping on green.
@jreback I rebased -- Travis CI passed but there is still one failure in `pandas.tests.io.parser.test_parsers.TestPythonParser` in CircleCI py35_ascii. I don't think this PR changed that file, though this doesn't seem to be happening on master...
thanks @rth