Skip to content

Commit

Permalink
Multiply Two Numbers function
Browse files Browse the repository at this point in the history
  • Loading branch information
Manezhahm committed Jan 12, 2025
1 parent 8412acd commit d6b44c0
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
1 change: 0 additions & 1 deletion solutions/tests/__init__.py

This file was deleted.

Empty file.
30 changes: 30 additions & 0 deletions solutions/tests/test_multiply_two_numbers.py
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()

0 comments on commit d6b44c0

Please sign in to comment.