TST: pytest deprecation warnings GH17197
State: closed

Test parameters with marks are updated according to the updated API of
Pytest.
https://docs.pytest.org/en/latest/changelog.html#pytest-3-2-0-2017-07-30
https://docs.pytest.org/en/latest/parametrize.html

- [x] closes #17197 
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry


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

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/17253?src=pr&el=h1) Report
> Merging [#17253](https://codecov.io/gh/pandas-dev/pandas/pull/17253?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/95f4f7dc78ac21a132b86b01c31efc5b0fdbceab?src=pr&el=desc) will **decrease** coverage by `0.01%`.
> The diff coverage is `n/a`.

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

```diff
@@            Coverage Diff             @@
##           master   #17253      +/-   ##
==========================================
- Coverage      91%   90.98%   -0.02%     
==========================================
  Files         162      162              
  Lines       49540    49540              
==========================================
- Hits        45085    45076       -9     
- Misses       4455     4464       +9
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.77% <ø> (ø)` | :arrow_up: |
| #single | `40.25% <ø> (-0.07%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/17253?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/17253?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-58.34%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/17253?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.72% <0%> (-0.1%)` | :arrow_down: |

------

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

can you figure the earliest version of pytest that we should allow?

and want to add this to the ci instructions and note in the contrib docs (we aren't going to test with an older version though).
I didn't realize that this deprecation in pytest has a much more verbose syntax. 
Thanks for reviewing the PR.

`pytest.param` was introduced in pytest version 3.1.0, and therefore, the new test code only work with pytest version 3.1.0 or later. Errors occur when pytest version 3.0.7 (the latest release before 3.1.0) is used.
https://docs.pytest.org/en/latest/changelog.html#id59

will add notes to `pandas/doc/contributing.md`. 
so need to update with ``pytest>=3.1.0``
```
appveyor.yml: - cmd: conda create -n pandas python=%PYTHON_VERSION% cython pytest pytest-xdist
ci/install_circle.sh:time conda install -n pandas pytest || exit 1
ci/install_travis.sh:time conda install -n pandas pytest
ci/requirements_all.txt:pytest
ci/requirements_dev.txt:pytest
````
will update `appveyor.yml`.

btw, it is strange that trevis build breaks after me rebasing onto the current master. `TestClipboard.test_round_trip_frame_sep` and `TestClipboard.test_round_trip_frame` failed, but it seems there's nothing much to do with this PR. Any ideas?
> btw, it is strange that trevis build breaks after me rebasing onto the current master. TestClipboard.test_round_trip_frame_sep and TestClipboard.test_round_trip_frame failed, but it seems there's nothing much to do with this PR. Any ideas?

these occasionally fail, ignore
`appveyor.yml` and other requirements files are updated, and the builds are green.
small comment on docs. otherwise lgtm. ping on green.
added and updated `pytest` usage examples. hope it makes the documentation clear. builds are all green.
@swyoon Thanks for the nice PR!
thank you all for kind reviewing. will hope to contribute to pandas again.