TST: suppress deprecation warnings for compress
State: closed

xref https://github.com/pandas-dev/pandas/pull/21930#issuecomment-408068861

In case we find it OK `np.compress` with Series is also deprecated, this PR makes sure the warnings are catched in the tests.

Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: Deprecate
description: Functionality to remove in pandas

Comments:
Copying from the other PR, how about we update the deprecation message to 

```
Use `series[condition] or np.asarray(series).compress(condition)`
```

We may also need something that `np.compress(series)` is also deprecated.

```python
Series.compress and np.compress(series, condition) are deprecated.

Use series[condition] or np.asarray(series).compress(condition) instead.
```
can you rebase
@TomAugspurger edited the deprecation message
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/22064?src=pr&el=h1) Report
> Merging [#22064](https://codecov.io/gh/pandas-dev/pandas/pull/22064?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/188a4fc5535ea9022d086d379cbcaf562c1123f6?src=pr&el=desc) will **decrease** coverage by `0.03%`.
> The diff coverage is `100%`.

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

```diff
@@            Coverage Diff             @@
##           master   #22064      +/-   ##
==========================================
- Coverage   92.08%   92.05%   -0.04%     
==========================================
  Files         169      169              
  Lines       50691    50709      +18     
==========================================
- Hits        46681    46679       -2     
- Misses       4010     4030      +20
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.46% <100%> (-0.04%)` | :arrow_down: |
| #single | `42.25% <0%> (-0.09%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/22064?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/series.py](https://codecov.io/gh/pandas-dev/pandas/pull/22064/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc2VyaWVzLnB5) | `93.72% <100%> (-0.4%)` | :arrow_down: |
| [pandas/core/internals/blocks.py](https://codecov.io/gh/pandas-dev/pandas/pull/22064/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW50ZXJuYWxzL2Jsb2Nrcy5weQ==) | `93.83% <0%> (-0.81%)` | :arrow_down: |
| [pandas/core/dtypes/missing.py](https://codecov.io/gh/pandas-dev/pandas/pull/22064/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZHR5cGVzL21pc3NpbmcucHk=) | `92.98% <0%> (-0.59%)` | :arrow_down: |
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/22064/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `85.85% <0%> (-0.21%)` | :arrow_down: |
| [pandas/core/generic.py](https://codecov.io/gh/pandas-dev/pandas/pull/22064/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ2VuZXJpYy5weQ==) | `96.44% <0%> (-0.04%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/22064/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.24% <0%> (-0.01%)` | :arrow_down: |
| [pandas/plotting/\_core.py](https://codecov.io/gh/pandas-dev/pandas/pull/22064/diff?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL19jb3JlLnB5) | `83.48% <0%> (ø)` | :arrow_up: |
| [pandas/core/indexes/multi.py](https://codecov.io/gh/pandas-dev/pandas/pull/22064/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9tdWx0aS5weQ==) | `95.41% <0%> (+0.07%)` | :arrow_up: |
| [pandas/core/ops.py](https://codecov.io/gh/pandas-dev/pandas/pull/22064/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvb3BzLnB5) | `96.71% <0%> (+0.14%)` | :arrow_up: |

------

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