Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix assertions in test_graph to actually test results #2906

Merged
merged 1 commit into from Jan 29, 2023

Conversation

asottile
Copy link
Contributor

I used this as an example in an upcoming video -- the current code doesn't properly validate the exception messages for two reasons (1) the | character allows it to unintentionally match a substring (for example raise ValueError("A cycle was detected") passes the test) and (2) the match argument uses re.search to find the substring match

personally I recommend not using match= at all and instead assert based on the excinfo object -- but this is the minimal "correct" change without annoying the PT011 linter

@gaborbernat gaborbernat merged commit 079f839 into main Jan 29, 2023
@gaborbernat gaborbernat deleted the asottile-patch-1 branch January 29, 2023 19:58
descope bot added a commit to descope/django-descope that referenced this pull request Feb 14, 2023
This PR contains the following updates:

| Package | Type | Update | Change | Pending |
|---|---|---|---|---|
| [tox](https://togithub.com/tox-dev/tox)
([changelog](https://tox.wiki/en/latest/changelog.html)) | dev | patch |
`4.4.2` -> `4.4.3` | `4.4.5` (+1) |

---

### Release Notes

<details>
<summary>tox-dev/tox</summary>

### [`v4.4.3`](https://togithub.com/tox-dev/tox/releases/tag/4.4.3)

[Compare Source](https://togithub.com/tox-dev/tox/compare/4.4.2...4.4.3)

#### What's Changed

- \[changelog.rst] typo fix by
[@&#8203;sparkiegeek](https://togithub.com/sparkiegeek) in
[tox-dev/tox#2900
- Support recursive extras defined in pyproject.toml by
[@&#8203;masenf](https://togithub.com/masenf) in
[tox-dev/tox#2905
- fix assertions in test_graph to actually test results by
[@&#8203;asottile](https://togithub.com/asottile) in
[tox-dev/tox#2906
- Avoid `pre-commit` `isort` crash by
[@&#8203;gschaffner](https://togithub.com/gschaffner) in
[tox-dev/tox#2908
- docs/faq.rst: clarify how constrain_package_deps works by
[@&#8203;masenf](https://togithub.com/masenf) in
[tox-dev/tox#2902

#### New Contributors

- [@&#8203;sparkiegeek](https://togithub.com/sparkiegeek) made their
first contribution in
[tox-dev/tox#2900
- [@&#8203;gschaffner](https://togithub.com/gschaffner) made their first
contribution in
[tox-dev/tox#2908

**Full Changelog**: tox-dev/tox@4.4.2...4.4.3

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xMDEuMCIsInVwZGF0ZWRJblZlciI6IjM0LjEwMS4wIn0=-->

Co-authored-by: descope[bot] <descope[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants