Bug in date_range with semi-open interval and freq='B'
State: closed

First contribution so this PR is really light.
#6673 is resolved on master, but this PR adds some tests to confirm this behavior.

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

Comments:
can you rebase on master
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/22095?src=pr&el=h1) Report
> Merging [#22095](https://codecov.io/gh/pandas-dev/pandas/pull/22095?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/0b7a08b70444056f964bb636a74ac41ca0058d37?src=pr&el=desc) will **increase** coverage by `0.01%`.
> The diff coverage is `n/a`.

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

```diff
@@            Coverage Diff             @@
##           master   #22095      +/-   ##
==========================================
+ Coverage   92.06%   92.07%   +0.01%     
==========================================
  Files         170      170              
  Lines       50705    50688      -17     
==========================================
- Hits        46680    46671       -9     
+ Misses       4025     4017       -8
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.48% <ø> (+0.01%)` | :arrow_up: |
| #single | `42.31% <ø> (ø)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/22095?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/tools/datetimes.py](https://codecov.io/gh/pandas-dev/pandas/pull/22095/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvdG9vbHMvZGF0ZXRpbWVzLnB5) | `85.07% <0%> (-0.15%)` | :arrow_down: |
| [pandas/io/sas/sas\_xport.py](https://codecov.io/gh/pandas-dev/pandas/pull/22095/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL3Nhcy9zYXNfeHBvcnQucHk=) | `90.23% <0%> (-0.05%)` | :arrow_down: |
| [pandas/io/formats/html.py](https://codecov.io/gh/pandas-dev/pandas/pull/22095/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2Zvcm1hdHMvaHRtbC5weQ==) | `88.81% <0%> (-0.04%)` | :arrow_down: |
| [pandas/core/indexing.py](https://codecov.io/gh/pandas-dev/pandas/pull/22095/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhpbmcucHk=) | `93.79% <0%> (-0.03%)` | :arrow_down: |
| [pandas/core/groupby/generic.py](https://codecov.io/gh/pandas-dev/pandas/pull/22095/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ3JvdXBieS9nZW5lcmljLnB5) | `86.79% <0%> (-0.02%)` | :arrow_down: |
| [pandas/core/sparse/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/22095/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc3BhcnNlL2ZyYW1lLnB5) | `94.78% <0%> (-0.02%)` | :arrow_down: |
| [pandas/core/indexes/interval.py](https://codecov.io/gh/pandas-dev/pandas/pull/22095/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9pbnRlcnZhbC5weQ==) | `94.11% <0%> (-0.02%)` | :arrow_down: |
| [pandas/core/dtypes/dtypes.py](https://codecov.io/gh/pandas-dev/pandas/pull/22095/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZHR5cGVzL2R0eXBlcy5weQ==) | `96.03% <0%> (-0.02%)` | :arrow_down: |
| [pandas/core/internals/blocks.py](https://codecov.io/gh/pandas-dev/pandas/pull/22095/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW50ZXJuYWxzL2Jsb2Nrcy5weQ==) | `94.45% <0%> (-0.02%)` | :arrow_down: |
| [pandas/core/nanops.py](https://codecov.io/gh/pandas-dev/pandas/pull/22095/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvbmFub3BzLnB5) | `95.12% <0%> (-0.01%)` | :arrow_down: |
| ... and [17 more](https://codecov.io/gh/pandas-dev/pandas/pull/22095/diff?src=pr&el=tree-more) | |

------

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

thanks @louis-red FYI normally like to move things in a separate PR as the diff is more clear, but ok.
thanks @jreback, I'm not as familiar with git as I thought I was, and so got a bit puzzled when you asked me to rebase, was planning on doing so this week-end. Anyway thanks for the information, I keep learning !