Fixturize tests/frame/test_constructors.py
State: closed

One more steps towards #22471. Again, needing to re-add some fixtures that were removed in #24885.

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

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

```diff
@@           Coverage Diff           @@
##           master   #25635   +/-   ##
=======================================
  Coverage   91.26%   91.26%           
=======================================
  Files         173      173           
  Lines       52968    52968           
=======================================
  Hits        48339    48339           
  Misses       4629     4629
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `89.83% <ø> (ø)` | :arrow_up: |
| #single | `41.71% <ø> (ø)` | :arrow_up: |


------

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

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

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

```diff
@@            Coverage Diff             @@
##           master   #25635      +/-   ##
==========================================
+ Coverage   41.95%   91.26%   +49.3%     
==========================================
  Files         180      173       -7     
  Lines       50765    52982    +2217     
==========================================
+ Hits        21300    48355   +27055     
+ Misses      29465     4627   -24838
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `89.83% <ø> (?)` | |
| #single | `41.76% <ø> (-0.2%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/25635?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/25635/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-58.34%)` | :arrow_down: |
| [pandas/compat/\_\_init\_\_.py](https://codecov.io/gh/pandas-dev/pandas/pull/25635/diff?src=pr&el=tree#diff-cGFuZGFzL2NvbXBhdC9fX2luaXRfXy5weQ==) | `58.03% <0%> (-33.97%)` | :arrow_down: |
| [pandas/plotting/\_misc.py](https://codecov.io/gh/pandas-dev/pandas/pull/25635/diff?src=pr&el=tree#diff-cGFuZGFzL3Bsb3R0aW5nL19taXNjLnB5) | `38.68% <0%> (-4.56%)` | :arrow_down: |
| [pandas/io/clipboard/clipboards.py](https://codecov.io/gh/pandas-dev/pandas/pull/25635/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2NsaXBib2FyZC9jbGlwYm9hcmRzLnB5) | `30.58% <0%> (-4.2%)` | :arrow_down: |
| [pandas/core/api.py](https://codecov.io/gh/pandas-dev/pandas/pull/25635/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYXBpLnB5) | `100% <0%> (ø)` | :arrow_up: |
| [pandas/core/groupby/\_\_init\_\_.py](https://codecov.io/gh/pandas-dev/pandas/pull/25635/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ3JvdXBieS9fX2luaXRfXy5weQ==) | `100% <0%> (ø)` | :arrow_up: |
| [pandas/\_libs/\_\_init\_\_.py](https://codecov.io/gh/pandas-dev/pandas/pull/25635/diff?src=pr&el=tree#diff-cGFuZGFzL19saWJzL19faW5pdF9fLnB5) | `100% <0%> (ø)` | :arrow_up: |
| [pandas/io/api.py](https://codecov.io/gh/pandas-dev/pandas/pull/25635/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2FwaS5weQ==) | `100% <0%> (ø)` | :arrow_up: |
| [pandas/\_libs/tslibs/\_\_init\_\_.py](https://codecov.io/gh/pandas-dev/pandas/pull/25635/diff?src=pr&el=tree#diff-cGFuZGFzL19saWJzL3RzbGlicy9fX2luaXRfXy5weQ==) | `100% <0%> (ø)` | :arrow_up: |
| [pandas/io/clipboards.py](https://codecov.io/gh/pandas-dev/pandas/pull/25635/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2NsaXBib2FyZHMucHk=) | `100% <0%> (ø)` | :arrow_up: |
| ... and [163 more](https://codecov.io/gh/pandas-dev/pandas/pull/25635/diff?src=pr&el=tree-more) | |

------

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

@jreback
All green.

PS. As noted in the other threads, this is a `TestData`-"fixture" that's used in several modules.
Just for context, these fixtures had already been there (since #22236), and were only recently removed in #24885, even though I noted that there was an ongoing (is somewhat stalled) translation effort.

Can we leave the re-org for later and not re-litigate the fixtures that we already agreed to use in #22236?
pls merge master
re `datetime_series`:
> @jreback: i don't think these fixtures useful; if you really really want them put them in the actual test file for now

I agree with you, but currently `tests.frame.common.TestData.ts1` is still used in several places, and will have to be on the level of `tests.frame.conftest` - another PR that needs the same fixture is #25627
closing as stale
@jreback

I had merged master like you asked, this PR is not stale. Please reopen.
@jreback @gfyoung @simonjayhawkins 
Can you please reopen this PR? Now that #25627 is in, this will be easier.
Ok, merged and cleaned. Got rid of the `datetime_series` and `datetime_series_short` fixture in the same way as @jreback in [this commit](https://github.com/pandas-dev/pandas/pull/25627/commits/8afc817bd292804791a60f72cee32f0a58f24525) of #25627.

Also: Thanks for reopening @simonjayhawkins.
lgtm.
thanks @h-vetinari