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

Create test for the addition operation #9

Open
dct0 opened this issue Nov 22, 2024 · 0 comments
Open

Create test for the addition operation #9

dct0 opened this issue Nov 22, 2024 · 0 comments
Assignees
Labels

Comments

@dct0
Copy link
Contributor

dct0 commented Nov 22, 2024

Task

Create the test for the addition operation. This can be seen in test_operations.py with the function called test_addition.

Acceptance Criteria

  • the test should fail if addition is wrong by mathematical logic
  • the test should succeed if addition is correct by mathematical logic

Answer

Note: It is not expected that you know how to write tests, so the answer is this. Your goal is to understand what this does and perform the change on your branch that you have created and create a pull request

def test_addition():
    """
    GIVEN: Two numbers
    WHEN:  passed in to the function addition
    THEN:  the resulting is the addition of the two numbers
    """
    assert addition(1,2) == 3
    assert addition(0,1) == 1
    assert addition(100,23) == 123
@dct0 dct0 added the test label Nov 22, 2024
@lainos123 lainos123 self-assigned this Nov 23, 2024
lainos123 added a commit that referenced this issue Nov 23, 2024
Create test for the addition operation #9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants