Intermediate unit test: Difference between revisions
Jump to navigation
Jump to search
| Line 16: | Line 16: | ||
== Exercises to be handed in == | == Exercises to be handed in == | ||
You should make a special folder for the exercises. I will refer to my special folder as ''unittest'' in these exercises. You will also see some ''__pycache__'' folders appear in places. This is Pythons cache for "compiled" programs. It is safe to ignore and also to delete, because it may become outdated. | You should make a special folder for the exercises. I will refer to my special folder as ''unittest'' in these exercises. You will also see some ''__pycache__'' folders appear in places. This is Pythons cache for "compiled" programs. It is safe to ignore and also to delete, because it may become outdated. | ||
== Exercises for extra practice == | == Exercises for extra practice == | ||
# Add unit tests for all methods in your '''fasta''' class. That will be a bit of work. | # Add unit tests for all methods in your '''fasta''' class. That will be a bit of work. | ||
Revision as of 14:05, 10 April 2026
| Previous: Beginning unit test | Next: Runtime evaluation |
Required course material for the lesson
Powerpoint: Testing
Online: pytest documentation
Resource: Unit test - start of reverse polish notation class
Blog: On testing, by the founder of StackExchange.
Subjects covered
Overview of test methods
Unit test using pytest framework.
Exercises to be handed in
You should make a special folder for the exercises. I will refer to my special folder as unittest in these exercises. You will also see some __pycache__ folders appear in places. This is Pythons cache for "compiled" programs. It is safe to ignore and also to delete, because it may become outdated.
Exercises for extra practice
- Add unit tests for all methods in your fasta class. That will be a bit of work.