程序代写案例-TU856/858

欢迎使用51辅导,51作业君孵化低价透明的学长辅导平台,服务保持优质,平均费用压低50%以上! 51fudao.top
TU856/858-2 Object Oriented Programming with Python
Semester 1, Lab Week 11, 04.12.2020
Dr. Bianca Schoen-Phelan

Please join the virtual classroom in brightspace first, before going to individual lab
links. I will provide explanations and hints and tricks regarding the lab at the
beginning of the lab sessions. These are recorded.

Please sign your group’s lab sign in sheet!
Lab solutions will be discussed in the Monday lecture. Labs are not marked.
Don’t forget about your revision item for the week!

Link to the lab groups (click).
Link to python documentation (click)​.
Link to python documentation on unittest (click).

Objectives​:
● Practice python ​unittesting
● Importing your own modules

Please update your github to fetch the lab file.


Your task:
● Plan tests for the methods in​ python_testing.py
○ Example set up for a ​testing spreadsheet here​ (copy file or make your own)
● Create a new Python file in your work directory where your tests are going to happen
○ Import unittest and the ​python_testing​ content
● Write all tests necessary to check the correct outcome of the methods
○ Hint: One method has a deliberate mistake
○ Make sure you check that errors are thrown for wrong input types
○ You must use a​ setUp()​ method
○ Use decorators where appropriate

Advanced:
● Start with the most recent lab and write a test plan and test cases for this lab
● Go backwards through the labs (exclude the card game for now, the Python
documentation linked above has some hints on how to test GUI, so feel free to go for
it after reading the material) and practice testing




​Well done!
Page 1 of 1

欢迎咨询51作业君
51作业君

Email:51zuoyejun

@gmail.com

添加客服微信: abby12468