Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Review and execute the Assignment3.py file, and the manual for the Python unit test library. import unittest print 'Assignment 3 Python reference code' numbers =

Review and execute the Assignment3.py file, and the manual for the Python unit test library.

import unittest print 'Assignment 3 Python reference code'

numbers = [[4, 3], [1,2], [154,233], [555,-444], [555,-444]]

def return_add_pair(pair): return str(pair[0]) + '+' + str(pair[1]) + '= ' + str(pair[0] + pair[1])

print ' return_add_pair examples' print return_add_pair(numbers[0]) print return_add_pair(numbers[1]) print return_add_pair(numbers[2]) print return_add_pair(numbers[3])

print ' Automated Test of show_add_pair'

class TestAssignment3(unittest.TestCase):

def test_one(self): self.assertEqual(return_add_pair([2, 3]), '2+3= 5')

if __name__ == '__main__': unittest.main()

A. Add at least 2 additional tests cases that you could use to test the return_add_pair function after test_one. Modify the function of return_add_pair to include a space between the + sign (i.e., 1+2 vs 1 + 2), and update the tests accordingly so that they pass .

B. How would you describe the software process you used to accomplish question A? Which of the primary software activities did you perform, and in what order?

C. If you were to accomplish Question A again, would you use the same process you used the first time? Given the opportunity to do it again, what would you change about your approach to Question A and why?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Databases And Information Systems 25th European Conference Adbis 2021 Tartu Estonia August 24 26 2021 Proceedings Lncs 12843

Authors: Ladjel Bellatreche ,Marlon Dumas ,Panagiotis Karras ,Raimundas Matulevicius

1st Edition

3030824713, 978-3030824716

More Books

Students also viewed these Databases questions

Question

Define Management by exception

Answered: 1 week ago

Question

Explain the importance of staffing in business organisations

Answered: 1 week ago

Question

What are the types of forms of communication ?

Answered: 1 week ago

Question

Describe how language reflects, builds on, and determines context?

Answered: 1 week ago