Review for Quiz 1
Functions and documentation
It is recommended to review these topics:
- Documentation elements (description, arguments, returns, errors)
- Defining functions with types
- Conditionals and iteration
NoneandOptional
Unit testing
It is recommended to review these topics:
self.assertEqual(),self.assertTrue(), andself.assertRaises()- Identifying test cases
We will not ask you to test functions that print things or take user input on the exam.
Git
It is recommended to review these topics:
- What is a repo? What is remote / local?
git clone <url>copies the remote repo to your computergit add <filename>stages the changes in the file, andgit add .stages all changes in the directorygit commit -m "message"commits the staged changesgit pushpushes all local commits to the remote repogit pullcopies all commits from the remote repo to your local repo which are not already there
Practice Quiz 1
Homework help: Git / command line / Pawtograder review
Recommended: Instructor goes to Pawtograder > HW1 > Test Assignment and "starts" the assignment like a student.
Helpful reminders:
- How to test functions that take user input or print things (mock the user)
- Tests in
tests/test_*.pyshould pass on anyone's implementation, not just yours. (Don't make the tests specific to your chosen additional questions). Tests specific to your implementation should go intests/impl_*.py. - For testing additional questions (especially generic, non-specific tests), use
dict