Python Programming: Write a program using unittest.TestCase methods to confirm that the addition and subtraction of date and timedelta objects produce correct results. Important notes: Use the unittest module to create a TestCase to test that the addition and subtraction of date and timedelta objects produce correct results... For example I could create a TestCase with a function that tests the addition of date and timedelta objects; a function that tests the subtraction of date and timedelta and then call unittest's main method at the end. When you run this program, it should tell us whether the text was successful or not. See attached image for what the output should look like.
Python
Write a program using unittest.TestCase methods to confirm that the addition and subtraction of date and timedelta objects produce correct results.
Important notes:
Use the unittest module to create a TestCase to test that the addition and subtraction of date and timedelta objects produce correct results... For example I could create a TestCase with a function that tests the addition of date and timedelta objects; a function that tests the subtraction of date and timedelta and then call unittest's main method at the end.
When you run this program, it should tell us whether the text was successful or not. See attached image for what the output should look like.
![test_add_floats
test_add_integers (
test_add_strings ( main
1.
main
. TestAdd)
ok
2.
main
.TestAdd)
... Ok
3.
. TestAdd)
... Ole
4.
5.
6.
Ran 3 tests in 0.000s
7.
8.
OK](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F36f9046e-a34d-43f2-ba4c-c4d16262d63e%2Fdbfdead7-11fc-444f-8be6-8909e1430ec8%2F6d6yuf_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)