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 async blackd tests which won't fail currently #966

Merged
merged 1 commit into from
Aug 5, 2019

Conversation

Jma353
Copy link
Contributor

@Jma353 Jma353 commented Aug 5, 2019

While working on #691, I discovered that I couldn't get blackd tests to fail in their current form (e.g. basic sanity check asserting 1 == 2 wouldn't fail the test suite).

I refactor the tests for blackd into their own AioHTTPTestCase which uses abstractions documented here from aiohttp. Now, tests fail reliably when they are forced to fail or when there's a legit logical error.

I also fix an exception that is thrown when no event loop is present in event_loop. Additionally, I raise in skip_if_exception when an exception that shouldn't cause the test to be skipped is caught.

@zsol zsol merged commit 154b985 into psf:master Aug 5, 2019
@zsol
Copy link
Collaborator

zsol commented Aug 5, 2019

Nice, thanks.

florczakraf pushed a commit to florczakraf/black that referenced this pull request Aug 27, 2019
florczakraf pushed a commit to florczakraf/black that referenced this pull request Oct 2, 2019
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