DSW-Unit 3-Tools and Practices, Part 1
Summary
Unit testing in Python, Test-Driven Development, Exceptions, Modules
Topics
- Python unittest
- Python annotations
- Background on Python OOP and classes (minimal amount needed to understand use of unittest)
- tdd red/green/refactor cycle
- Exception handling in Python
- importing modules
- creating user-defined modules
- using pip to install modules
- Pair programming
- Llewellyn Falco's Strong-Style Pair Programming
- Mob programming
Learning Objectives
- The student will be able to create test cases for simple numeric functions
- The student will be able to create test cases for functions involving complex data types
- The student will be able to identify which parts of a Python unittest suite are annotations (e.g. @unittest.skip())
- The student will be able to differentiate between inherited methods and user-defined methods in the limited context of extending the unittest class to create test suites
- The student will demonstrate an ability to use the Python documentation to locate the inherited methods of unittest
- The student will be able to explain and demonstrate the red/green/refactor cycle
- The student will be able to write code to throw Python exceptions when appropriate (e.g. when parameter values are not reasonable)
- The student will be able to write the appropriate unittest methods to check that the correct Python exceptions are thrown
- The student will demonstrate an understanding of importing modules, both user-defined and standard modules
- The student will demonstrate an understanding of how to create, import and use their own modules
- The student will demonstrate that they can use pip to install third-party libraries and then import them in their code
- The student will demonstrate an understanding of the roles of driver and navigator in pair-programming
- The student will be able to explain possible benefits and drawbacks of pair-programming
- The student will be able to explain and demonstrate both roles Llewellyn's Falco's Strong-Style Pair Programing
- The student will be able to explain, and demonstrate various roles in mob programming