forked from MIT-Emerging-Talent/ET6-practice-code-review
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
""" | ||
Test module for multiply two numbers function. | ||
Created 2025-01-04 | ||
@author: Manezhah Mohmand | ||
""" | ||
|
||
import unittest | ||
from solutions.multiply_two_numbers import multiply_two_numbers | ||
|
||
|
||
class TestMultiplyTwoNumbers(unittest.TestCase): | ||
"""Tests for multiply_two_numbers function.""" | ||
|
||
def test_positive_numbers(self): | ||
"""It should return the product of two positive numbers.""" | ||
self.assertEqual(multiply_two_numbers(2, 3), 6) | ||
|
||
def test_negative_numbers(self): | ||
"""It should return the product of two negative numbers.""" | ||
self.assertEqual(multiply_two_numbers(-2, -3), 6) | ||
|
||
def test_mixed_sign_numbers(self): | ||
"""It should return the product of one positive and one negative number.""" | ||
self.assertEqual(multiply_two_numbers(-2, 3), -6) | ||
|
||
|
||
if __name__ == "__main__": | ||
unittest.main() |