Cleanup clipboard tests
State: closed

As requested in #21111, I've refactored the original clipboard tests as well as adding my own.  The set of tests have been improved to include testing of:

- failure of tab delimited tables (#21104)
- errors relating to copying and reading space-delimited tables
- copy and pasting tables where the text contains quotes or delimiters

As a result, these tests will fail on the current master branch, but should succeed on the commit in #21111

@WillAyd

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

Comments:
Hello @david-liu-brattle-1! Thanks for updating the PR.

 - In the file [`pandas/tests/io/test_clipboard.py`](https://github.com/pandas-dev/pandas/blob/7888f83bbbbb39324315fbf4a8abd137cc24e184/pandas/tests/io/test_clipboard.py), following are the PEP8 issues :

> [Line 140:74](https://github.com/pandas-dev/pandas/blob/7888f83bbbbb39324315fbf4a8abd137cc24e184/pandas/tests/io/test_clipboard.py#L140): [W291](https://duckduckgo.com/?q=pep8%20W291) trailing whitespace



##### Comment last updated on June 23, 2018 at 19:07 Hours UTC
@jreback 
I made some changes to the testing setup.  Is this what you had in mind?
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/21163?src=pr&el=h1) Report
> Merging [#21163](https://codecov.io/gh/pandas-dev/pandas/pull/21163?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/172ab7aee433fed7780bf96f0c723af284755324?src=pr&el=desc) will **increase** coverage by `0.06%`.
> The diff coverage is `n/a`.

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

```diff
@@            Coverage Diff             @@
##           master   #21163      +/-   ##
==========================================
+ Coverage   91.84%    91.9%   +0.06%     
==========================================
  Files         153      154       +1     
  Lines       49505    49562      +57     
==========================================
+ Hits        45466    45549      +83     
+ Misses       4039     4013      -26
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.3% <ø> (+0.06%)` | :arrow_up: |
| #single | `42.02% <ø> (+0.14%)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/21163?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/formats/csvs.py](https://codecov.io/gh/pandas-dev/pandas/pull/21163/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2Zvcm1hdHMvY3N2cy5weQ==) | `97.67% <0%> (-0.47%)` | :arrow_down: |
| [pandas/core/panel.py](https://codecov.io/gh/pandas-dev/pandas/pull/21163/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvcGFuZWwucHk=) | `97.44% <0%> (-0.43%)` | :arrow_down: |
| [pandas/core/indexes/datetimes.py](https://codecov.io/gh/pandas-dev/pandas/pull/21163/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9kYXRldGltZXMucHk=) | `95.66% <0%> (-0.12%)` | :arrow_down: |
| [pandas/core/indexes/multi.py](https://codecov.io/gh/pandas-dev/pandas/pull/21163/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9tdWx0aS5weQ==) | `94.89% <0%> (-0.11%)` | :arrow_down: |
| [pandas/io/json/normalize.py](https://codecov.io/gh/pandas-dev/pandas/pull/21163/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2pzb24vbm9ybWFsaXplLnB5) | `96.87% <0%> (-0.07%)` | :arrow_down: |
| [pandas/core/indexes/base.py](https://codecov.io/gh/pandas-dev/pandas/pull/21163/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9iYXNlLnB5) | `96.63% <0%> (-0.06%)` | :arrow_down: |
| [pandas/core/arrays/categorical.py](https://codecov.io/gh/pandas-dev/pandas/pull/21163/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYXJyYXlzL2NhdGVnb3JpY2FsLnB5) | `95.63% <0%> (-0.04%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/21163/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.19% <0%> (-0.04%)` | :arrow_down: |
| [pandas/core/indexes/category.py](https://codecov.io/gh/pandas-dev/pandas/pull/21163/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9jYXRlZ29yeS5weQ==) | `97.01% <0%> (-0.03%)` | :arrow_down: |
| [pandas/core/dtypes/common.py](https://codecov.io/gh/pandas-dev/pandas/pull/21163/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZHR5cGVzL2NvbW1vbi5weQ==) | `94.63% <0%> (-0.02%)` | :arrow_down: |
| ... and [31 more](https://codecov.io/gh/pandas-dev/pandas/pull/21163/diff?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/21163?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/21163?src=pr&el=footer). Last update [172ab7a...2613a06](https://codecov.io/gh/pandas-dev/pandas/pull/21163?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

@jreback 
Yes, all xfails pass in #21111
thanks @david-liu-brattle-1 !