Added Hypothesis property-based test for timedelta addition
State: closed

- [ ] closes #xxxx
- [1 ] tests added / passed
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

- This is the first pull request I've done on any project in any language.  Any feedback, pointing to docs, requests to work on other issues instead, etc. happily accepted. Thanks for your work on Pandas!

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

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

```diff
@@            Coverage Diff             @@
##           master   #26312      +/-   ##
==========================================
- Coverage   92.04%   92.03%   -0.01%     
==========================================
  Files         175      175              
  Lines       52302    52302              
==========================================
- Hits        48142    48138       -4     
- Misses       4160     4164       +4
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.59% <ø> (ø)` | :arrow_up: |
| #single | `40.72% <ø> (-0.18%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/26312?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/26312/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/26312/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.01% <0%> (-0.12%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/26312?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/26312?src=pr&el=footer). Last update [20fa58d...c016166](https://codecov.io/gh/pandas-dev/pandas/pull/26312?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/26312?src=pr&el=h1) Report
> Merging [#26312](https://codecov.io/gh/pandas-dev/pandas/pull/26312?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/20fa58d48a7788e980a084ac05196cab2cc055ac?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/26312/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/26312?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #26312      +/-   ##
==========================================
- Coverage   92.04%   92.03%   -0.01%     
==========================================
  Files         175      175              
  Lines       52302    52302              
==========================================
- Hits        48142    48138       -4     
- Misses       4160     4164       +4
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.59% <ø> (ø)` | :arrow_up: |
| #single | `40.72% <ø> (-0.18%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/26312?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/26312/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/26312/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.01% <0%> (-0.12%)` | :arrow_down: |

------

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

> Thanks for the PR. Can you speak to the utility of this though? Is it closing an issue or increasing coverage that doesn't exist?

It's not increasing coverage per se, it's an attempt to improve the quality of the test where it exists:
- The current test says 'with some particular Timestamp and some particular Timedelta, check that adding them produces the expected result.'
- This test says 'give me 100 random examples of Timestamps and Timedeltas, and check that adding them produces the expected result.'

Note that the coverage report says that this change REDUCES the code coverage by 0.1%, even though I didn't remove any tests. I'm not sure what the next step is on that, nor the other failing test.

I'd like to add more of these tests and eventually also improve code coverage, but this first one was a trial balloon.
If you'd like to help increase test coverage (not necessarily code path test coverage), we have quite a number of issues that would need regression tests.

https://github.com/pandas-dev/pandas/issues?q=is%3Aopen+is%3Aissue+label%3A%22Needs+Tests%22
Closing as not sure we want / need this, though @c74p we certainly appreciate any contributions you'd like to make. What @mroeschke linked to above would be a good reference if you are looking to help out