Question
Please provide code for a unit test program to test the following functions: def addition(x, y): return x + y def subtraction(x, y): return x
Please provide code for a unit test program to test the following functions:
def addition(x, y):
return x + y
def subtraction(x, y):
return x - y
def multiplication(x, y):
return x * y
def division(x, y):
return x / y
For each function, should test:
- When given two positive numbers, whether the function returns correct value
- When given negative numbers, whether the function returns correct value
- When given one positive number and one negative number , whether the function returns correct value
Step by Step Solution
3.48 Rating (161 Votes )
There are 3 Steps involved in it
Step: 1
Heres an example of a unit test program using Pythons builtin unittest framework to test the additio...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get StartedRecommended Textbook for
Computer Organization And Design The Hardware Software Interface
Authors: David A. Patterson, John L. Hennessy
4th Revised Edition
0123747503, 978-0123747501
Students also viewed these Programming questions
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
View Answer in SolutionInn App