MAINT: Condense TIMEZONE_IDS construction
State: closed

Follow-up to #26596

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

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

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

```diff
@@            Coverage Diff             @@
##           master   #26600      +/-   ##
==========================================
- Coverage   91.87%   91.86%   -0.01%     
==========================================
  Files         174      174              
  Lines       50661    50661              
==========================================
- Hits        46547    46542       -5     
- Misses       4114     4119       +5
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.4% <ø> (ø)` | :arrow_up: |
| #single | `41.76% <ø> (-0.11%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/26600?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/26600/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `78.94% <0%> (-10.53%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/26600/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97% <0%> (-0.12%)` | :arrow_down: |
| [pandas/util/testing.py](https://codecov.io/gh/pandas-dev/pandas/pull/26600/diff?src=pr&el=tree#diff-cGFuZGFzL3V0aWwvdGVzdGluZy5weQ==) | `90.6% <0%> (-0.11%)` | :arrow_down: |

------

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

@gfyoung @jreback this is IMO a step back - several of these objects don't have nice str/reprs, and it really makes sense to invest the extra 4(!) lines to have a clean output of `pytest -v`.

Comparing master vs this PR with the following dummy test:
```
def test_demo_tz_id(tz_aware_fixture):
    pass
```
this is the state of master:
```
test_demo_tz_id[UTC] PASSED                                                                   [  7%]
test_demo_tz_id[US/Eastern] PASSED                                                            [ 15%]
test_demo_tz_id[Asia/Tokyp] PASSED                                                            [ 23%]
test_demo_tz_id[dateutil/US/Pacific] PASSED                                                   [ 30%]
test_demo_tz_id[dateutil/Asia/Singapore] PASSED                                               [ 38%]
test_demo_tz_id[dateutil.tz.tzutz()] PASSED                                                   [ 46%]
test_demo_tz_id[dateutil.tz.tzlocal()] PASSED                                                 [ 53%]
test_demo_tz_id[pytz.FixedOffset(300)] PASSED                                                 [ 61%]
test_demo_tz_id[pytz.FixedOffset(0)] PASSED                                                   [ 69%]
test_demo_tz_id[pytz.FixedOffset(-300)] PASSED                                                [ 76%]
test_demo_tz_id[datetime.timezone.utc] PASSED                                                 [ 84%]
test_demo_tz_id[datetime.timezone.+1] PASSED                                                  [ 92%]
test_demo_tz_id[datetime.timezone.-1.named] PASSED                                            [100%]
```
resp. of this PR:
```
test_demo_tz_id[UTC] PASSED                                                                   [  7%]
test_demo_tz_id[US/Eastern] PASSED                                                            [ 15%]
test_demo_tz_id[Asia/Tokyo] PASSED                                                            [ 23%]
test_demo_tz_id[dateutil/US/Pacific] PASSED                                                   [ 30%]
test_demo_tz_id[dateutil/Asia/Singapore] PASSED                                               [ 38%]
test_demo_tz_id[tzutc()] PASSED                                                               [ 46%]
test_demo_tz_id[tzlocal()] PASSED                                                             [ 53%]
test_demo_tz_id[pytz.FixedOffset(300)] PASSED                                                 [ 61%]
test_demo_tz_id[<UTC>] PASSED                                                                 [ 69%]
test_demo_tz_id[pytz.FixedOffset(-300)] PASSED                                                [ 76%]
test_demo_tz_id[datetime.timezone.utc] PASSED                                                 [ 84%]
test_demo_tz_id[datetime.timezone(datetime.timedelta(seconds=3600))] PASSED                   [ 92%]
test_demo_tz_id[datetime.timezone(datetime.timedelta(days=-1, seconds=82800), 'foo')] PASSED  [100%]
```
In tests with more fixtures (like I'm working on in #25637), this would make the output absurdly wide.
@jreback : If you could have another look.  The failures seem unrelated...

(e.g. see this build [here](https://dev.azure.com/pandas-dev/pandas/_build/results?buildId=12139) for a branch that I made off of `master` just now)
https://dev.azure.com/pandas-dev/pandas/_build/results?buildId=12180

Really not sure why `numpy` and `scipy` aren't playing nice together.  They're the same versions as in this passing build on latest `master`:

https://dev.azure.com/pandas-dev/pandas/_build/results?buildId=12180
@gfyoung weird, can you merge master and repush and see
https://dev.azure.com/pandas-dev/pandas/_build/results?buildId=12207

@jreback : Alas, no luck after merging and repushing
@jreback : It seems that dropping the fixture decorator is causing issues with that one Azure case.  Why that's the case?  No idea - it's quite bizarre.

I'm inclined to just use `repr` to generate `TIMEZONE_IDS` for the time being, and we can then see later what's happening with that decorator.

Thoughts?
@gfyoung sounds fine
@jreback : Everything is cleaned up and green.  PTAL.
thanks @gfyoung