DOC: Add clear and other parameter docs to assert_produces_warning
State: closed

- [GH18996 ] closes #18996
- Added information on `clear` parameter 
- Added information on other undocumented parameters (expected_warning, filter_level, check_stacklevel)


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

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19066?src=pr&el=h1) Report
> Merging [#19066](https://codecov.io/gh/pandas-dev/pandas/pull/19066?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/78147e9c84fb55a67af382a2d3a090e6b0828532?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/19066/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/19066?src=pr&el=tree)

```diff
@@           Coverage Diff           @@
##           master   #19066   +/-   ##
=======================================
  Coverage   91.51%   91.51%           
=======================================
  Files         148      148           
  Lines       48780    48780           
=======================================
  Hits        44639    44639           
  Misses       4141     4141
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `89.88% <0%> (ø)` | :arrow_up: |
| #single | `41.61% <0%> (+0.01%)` | :arrow_up: |


------

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

Thanks for the quick and thorough review @jreback. I've pushed your requested changes.  
can you ``git merge master`` and push again (generally we want to rebase / merge master anytime you push).
I did `git merge master` and then `git push origin doc_clear` on my feature branch in my forked repo. Is that correct? The git messages were "Already up-to-date" and "Everything up-to-date".
``git merge upstream`` sorry you need to pull from the upstream (this should point to the pandas-dev/master.git``

```
(pandas) bash-3.2$ git remote -v
jreback https://github.com/jreback/pandas.git (fetch)
jreback https://github.com/jreback/pandas.git (push)
upstream        https://github.com/pandas-dev/pandas.git (fetch)
upstream        https://github.com/pandas-dev/pandas.git (push)
```
Whoops, looks like some unrelated commits got in here.  Do you want help walking through the git commands?

I think the simplest version would be

```
git reset --soft upstream/master
git commit -m "Fixed git issue"
git push -f origin
```

That'll rewrite history (which is usually not good, but OK for this PR) and hopefully clean everything up.
@TomAugspurger Hi Tom. I ran the commands above. Are there any additional commands I need to run to deliver this change? Thanks!
The diff looks good now, thanks. Let us know if you see that the tests all pass before we do.
I need help with troubleshooting the travis-ci errors. I don't understand what the problem is. Thanks!
I restarted those. I think boto (one of our dependencies) had a bad release yesterday. They've been passing today.

Ping on green :)
thanks!