-
-
Notifications
You must be signed in to change notification settings - Fork 46.5k
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
Converted tests into doctests #10572
Conversation
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you delete the code instead of just commenting it out?
Absolutely! I commented the code in case they would be needed in future. |
@tianyizheng02 Hi, would you recommend creating another pull request or should I delete the currently forked repo and fork again to make changes? |
for more information, see https://pre-commit.ci
I don't particularly appreciate removing code without good reason. def test_and_gate() -> None:
"""
Tests the and_gate function
"""
assert and_gate(0, 0) == 0
assert and_gate(0, 1) == 0
assert and_gate(1, 0) == 0
assert and_gate(1, 1) == 1 can be run by our GitHub Actions build step just by adding one line... def test_and_gate() -> None:
"""
Tests the and_gate function
>>> test_and_gate()
"""
assert and_gate(0, 0) == 0
assert and_gate(0, 1) == 0
assert and_gate(1, 0) == 0
assert and_gate(1, 1) == 1 |
* Converted tests into doctests * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Removed commented code * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Describe your change:
Turned tests into doctests in the Boolean Algebra section for consistency and as an improved way of testing.
Checklist: