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

test.py: isolate assertions; DRY data generation #93

Merged
merged 1 commit into from
Jun 13, 2021

Conversation

ryneeverett
Copy link
Contributor

@ryneeverett ryneeverett commented Jun 11, 2021

The majority of the test code is just creating the stdout data against
which to make assertions. Increasing the test cases will be more
manageable if the assertions are separate from this data generation.

It is also a generally preferred style to have one assertion per test,
because this way all assertions run even if others fail and each test
only fails for one reason. It also facilitates better test documentation
and adding additional tests without increasing complexity.

The majority of the test code is just creating the stdout data against
which to make assertions. Increasing the test cases will be more
manageable if the assertions are separate from this data generation.

It is also a generally preferred style to have one assertion per test,
because this way all assertions run even if others fail and each test
only fails for one reason. It also facilitates better test documentation
and adding additional tests without increasing complexity.
@ryneeverett
Copy link
Contributor Author

Rebased.

@Mic92 Mic92 merged commit 4eab19b into nix-community:master Jun 13, 2021
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