TST: test for inconsistency due to dtype=string #46512
- [x] closes #46512
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] Added an entry in the latest `pandas/core/generic.py` file if fixing a bug or adding a new feature.

Hello @Shadimrad! Thanks for updating this PR. We checked the lines you've touched for [PEP 8](https://www.python.org/dev/peps/pep-0008) issues, and found:



There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers: 

##### Comment last updated at 2022-08-18 23:51:54 UTC I'll milestone this as 1.5

from https://github.com/pandas-dev/pandas/issues/46512#issue-1181203886

> The behavior for the inplace=False case has changed from 1.4.1 to main since https://github.com/pandas-dev/pandas/pull/45168 allows other na values in the StringArray Constructor.

the testing for `inplace=True` would be further confirming the regression fix, #47763, but with the change for `inplace=False`, would need some work if backporting. take Sure. I'll fix it.

On Wed, 17 Aug 2022, 10:01 am Matthew Roeschke, ***@***.***>
wrote:

> ***@***.**** commented on this pull request.
> ------------------------------
>
> In pandas/tests/arrays/string_/test_string.py
> <https://github.com/pandas-dev/pandas/pull/47793#discussion_r948207565>:
>
> > @@ -611,3 +611,11 @@ def test_setitem_scalar_with_mask_validation(dtype):
>          msg = "Scalar must be NA or str"
>      with pytest.raises(ValueError, match=msg):
>          ser[mask] = 1
> +
> +
> +def test_consitency_inplace():
> +    df = pd.DataFrame({"M": [""]}, dtype="string")
> +    df2 = pd.DataFrame({"M": [""]}, dtype="string")
> +    df2.where(df2 != "", np.nan, inplace=True)
>
> Would be good to compare df and df2 to a separately created DataFrame e.g.
>
> expected = pd.DataFrame(...)
> tm.assert_frame_equal(df, expected)
> tm.assert_frame_equal(df2, expected)
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/pandas-dev/pandas/pull/47793#pullrequestreview-1076116145>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AWI7Q465NG3MD5XUBTTZ7DDVZULFDANCNFSM54BVWMNA>
> .
> You are receiving this because you were assigned.Message ID:
> ***@***.***>
>
 I don't think this test is entirely required for 1.5 so removing that milestone. Once ready, we can scope for the 1.6 branch. This pull request is stale because it has been open for thirty days with no activity. Please [update](https://pandas.pydata.org/pandas-docs/stable/development/contributing.html#updating-your-pull-request) and respond to this comment if you're still interested in working on this. Thanks for the pull request, but it appears to have gone stale. If interested in continuing, please merge in the main branch, address any review comments and/or failing tests, and we can reopen.