Skip to content

Replace unittest assertions with modern assertions#625

Merged
neerajprad merged 2 commits intodevfrom
modern-assertions
Dec 13, 2017
Merged

Replace unittest assertions with modern assertions#625
neerajprad merged 2 commits intodevfrom
modern-assertions

Conversation

@fritzo
Copy link
Copy Markdown
Member

@fritzo fritzo commented Dec 13, 2017

@OptimusLime noticed that Pyro's tests mix old-style unittest assertions with new-style pytest assertions and the nicer assert_equal() helper. This PR cleans up all of our tests to reduce use of unittest.

Why?

Pytest provides better printing of error messages and a cleaner syntax for assertions, compared with unittest. Arguably pytest tests also require less boilerplate.

eb8680
eb8680 previously approved these changes Dec 13, 2017
Copy link
Copy Markdown
Member

@eb8680 eb8680 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, looking forward to removing unittest dependencies entirely

Copy link
Copy Markdown
Member

@neerajprad neerajprad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for doing this.

@neerajprad neerajprad merged commit 05b5665 into dev Dec 13, 2017
@fritzo fritzo deleted the modern-assertions branch December 18, 2017 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants