-
Notifications
You must be signed in to change notification settings - Fork 1
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
Brainteasers: array_product #22
base: main
Are you sure you want to change the base?
Conversation
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.
This part of coding for test is supposed to not be changed and it is kept intact and we instead need to write codes in its corresponding 'src' file and then run these tests codes. And make sure that tests are passed.
@@ -1,22 +1,38 @@ | |||
import unittest |
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.
This part of coding for test is supposed to not be changed and it is kept intact and we need to only write codes in its corresponding 'src' file the coding solutions that pass these tests.
input_array = [1, 2, 3, 4, 5] | ||
expected = [120, 60, 40, 30, 24] | ||
actual = product_of_array_except_self(input_array) | ||
self.assertEqual(actual, expected) | ||
|
||
def test_empty_array(self): | ||
""" | ||
This test checks if the function correctly handles the case where the input array is empty. | ||
""" | ||
input_array = [] | ||
expected = [] | ||
actual = product_of_array_except_self(input_array) | ||
self.assertEqual(actual, expected) | ||
|
||
def test_array_with_one_element(self): |
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.
All methods are from test part which is already developed. It does not require any changes, please keep it intact, instead you can write codes in its corresponding 'src' file and then run these tests codes. And make sure that tests are passed.
main
/master
README Documentation
/src/README.md
Python Files
test_<module_name>.py
Function Docstring
Function Implementation
Unit Test Suite