TST: add test for duplicated frame/test_analytics
State: closed

Preparation for #21645

Added some parametrised tests for `duplicated`.

In addition, I reordered the tests slightly. Currently, the tests in `tests/frame/test_analytics.py` test the following functions in order:
```
drop_duplicates
duplicated
duplicated
drop_duplicates
drop_duplicates
[...]
```

Since I am (and will be) adding several tests for `duplicated`, I'd like to group them within the code, and moved the two existing tests for `duplicated` to the top of that section.


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

Comments:
One single test failure in 1/7 jobs is unrelated:
```
E           AssertionError: Caused unexpected warning(s): [('ResourceWarning',
ResourceWarning("unclosed file <_io.BufferedReader name='/var/folders/bb/n7t3rs157850byt_jfdcq9k80000gn/T/tmptvrq0c3stest_file.zip'>",),
'/Users/travis/miniconda3/envs/pandas/lib/python3.5/site-packages/pluggy/__init__.py', 139)].
```
can you move the duplicated test into a new file frame/test_duplicates. same for series (you can move unique too as well)
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/21898?src=pr&el=h1) Report
> Merging [#21898](https://codecov.io/gh/pandas-dev/pandas/pull/21898?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/365eac4d27353693a2b758c87fc4bceabb74817f?src=pr&el=desc) will **increase** coverage by `0.05%`.
> The diff coverage is `n/a`.

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

```diff
@@            Coverage Diff             @@
##           master   #21898      +/-   ##
==========================================
+ Coverage   91.91%   91.96%   +0.05%     
==========================================
  Files         164      166       +2     
  Lines       49992    50323     +331     
==========================================
+ Hits        45951    46281     +330     
- Misses       4041     4042       +1
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.36% <ø> (+0.06%)` | :arrow_up: |
| #single | `42.23% <ø> (+0.07%)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/21898?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/indexes/timedeltas.py](https://codecov.io/gh/pandas-dev/pandas/pull/21898/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy90aW1lZGVsdGFzLnB5) | `91.53% <0%> (-0.65%)` | :arrow_down: |
| [pandas/core/indexes/base.py](https://codecov.io/gh/pandas-dev/pandas/pull/21898/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9iYXNlLnB5) | `96.35% <0%> (-0.23%)` | :arrow_down: |
| [pandas/core/indexes/datetimes.py](https://codecov.io/gh/pandas-dev/pandas/pull/21898/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9kYXRldGltZXMucHk=) | `95.16% <0%> (-0.18%)` | :arrow_down: |
| [pandas/core/algorithms.py](https://codecov.io/gh/pandas-dev/pandas/pull/21898/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYWxnb3JpdGhtcy5weQ==) | `94.69% <0%> (-0.16%)` | :arrow_down: |
| [pandas/io/packers.py](https://codecov.io/gh/pandas-dev/pandas/pull/21898/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL3BhY2tlcnMucHk=) | `88.04% <0%> (-0.16%)` | :arrow_down: |
| [pandas/core/dtypes/common.py](https://codecov.io/gh/pandas-dev/pandas/pull/21898/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZHR5cGVzL2NvbW1vbi5weQ==) | `95.07% <0%> (ø)` | :arrow_up: |
| [pandas/core/arrays/\_\_init\_\_.py](https://codecov.io/gh/pandas-dev/pandas/pull/21898/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYXJyYXlzL19faW5pdF9fLnB5) | `100% <0%> (ø)` | :arrow_up: |
| [pandas/core/dtypes/inference.py](https://codecov.io/gh/pandas-dev/pandas/pull/21898/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZHR5cGVzL2luZmVyZW5jZS5weQ==) | `98.41% <0%> (ø)` | :arrow_up: |
| [pandas/core/arrays/timedelta.py](https://codecov.io/gh/pandas-dev/pandas/pull/21898/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYXJyYXlzL3RpbWVkZWx0YS5weQ==) | | |
| [pandas/core/arrays/timedeltas.py](https://codecov.io/gh/pandas-dev/pandas/pull/21898/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYXJyYXlzL3RpbWVkZWx0YXMucHk=) | `89.84% <0%> (ø)` | |
| ... and [14 more](https://codecov.io/gh/pandas-dev/pandas/pull/21898/diff?src=pr&el=tree-more) | |

------

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

thanks @h-vetinari