Skip to content

Suggestion: Add a function call to the boolean_algebra/and_gate.py file. #8656

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

Closed
code-dev05 opened this issue Apr 15, 2023 · 2 comments
Closed
Labels
awaiting triage Awaiting triage from a maintainer

Comments

@code-dev05
Copy link

What would you like to share?

In the lines 35 - 42, test_and_gate() function is defined.

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

But it is never called during the entire run time of the program.
Therefore, I would suggest adding a function call test_and_gate() between lines 45 and 46 to first verify all assertions before any real output.

Additional information

No response

@code-dev05 code-dev05 added the awaiting triage Awaiting triage from a maintainer label Apr 15, 2023
@rohan472000 rohan472000 mentioned this issue Apr 24, 2023
14 tasks
rohan472000 added a commit to rohan472000/Python that referenced this issue Apr 24, 2023
addressing issue TheAlgorithms#8656 by calling `test_and_gate()` , ensuring that all the assertions are verified before the actual output is printed.
@rohan472000
Copy link
Contributor

@code-dev05 , kindly see PR #8690 .

ChrisO345 pushed a commit that referenced this issue May 10, 2023
* Update and_gate.py

addressing issue #8656 by calling `test_and_gate()` , ensuring that all the assertions are verified before the actual output is printed.

* Update and_gate.py

addressing issue #8632
@tianyizheng02
Copy link
Contributor

@ChrisO345 this issue can be closed now since #8690 was merged

tianyizheng02 pushed a commit to tianyizheng02/Python that referenced this issue May 29, 2023
* Update and_gate.py

addressing issue TheAlgorithms#8656 by calling `test_and_gate()` , ensuring that all the assertions are verified before the actual output is printed.

* Update and_gate.py

addressing issue TheAlgorithms#8632
sedatguzelsemme pushed a commit to sedatguzelsemme/Python that referenced this issue Sep 15, 2024
* Update and_gate.py

addressing issue TheAlgorithms#8656 by calling `test_and_gate()` , ensuring that all the assertions are verified before the actual output is printed.

* Update and_gate.py

addressing issue TheAlgorithms#8632
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting triage Awaiting triage from a maintainer
Projects
None yet
Development

No branches or pull requests

4 participants