Skip to content

Fix signature of assertRaisesRegexp in unittest #3434

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

Merged
merged 1 commit into from
Nov 1, 2019

Conversation

JukkaL
Copy link
Contributor

@JukkaL JukkaL commented Nov 1, 2019

Fixes mypy false positive "None" has noattribute "__enter__" here:

class Foo(unittest.TestCase):
    def test_foo(self) -> None:
        with self.assertRaisesRegexp(Exception, "foo"):
            1 / 0

Fixes regression introduced in e6c467a.

Fixes mypy false positive `"None" has noattribute "__enter__"` here:

```
class Foo(unittest.TestCase):
    def test_foo(self) -> None:
        with self.assertRaisesRegexp(Exception, "foo"):
            1 / 0
```

Fixes regression introduced in e6c467a.
@JukkaL JukkaL merged commit 86135ed into python:master Nov 1, 2019
@JukkaL JukkaL deleted the fix-unittest branch November 1, 2019 15:48
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.

2 participants