Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For this lab your goal will be to add a assert statements to the PyNote program from Lab 3 . The program has been updated

For this lab your goal will be to add a assert statements to the PyNote program from Lab 3. The program has been updated with some new features. As the PyNote program continues to grow, we want to introduce some simple tests so that we know when we break a critical feature. A python code named lab5.py has been provided for you here Download here. The lab5 code is already functional.
You are free to implement your code however you want, but it must include the following requirements:
An assert statements to test that the is_int function returns expected results given an argument of any type.
An assert statement that raises an AssertionError when a FileNotFoundError is not raised when the remove_note function is called, but the "pynote.txt" file does not exist.
Once you have completed both 1 and 2, modify the remove_note function so that it passes 2.
Some considerations
You will need to consider where to place each of these assert statements so that they run when the program is run.
To test requirement 2, you will need to delete the PyNote.txt file while the program is running.

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

Step: 3

blur-text-image

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

More Books

Students also viewed these Databases questions