Python: Unit Testing
Provided by: UCS
Tue 19 Jun 2012 – University Computing Service, Phoenix Teaching Room
| There are places available - Book a place |
Description: This course is part of the Scientific Computing series.
This course will introduce the concepts of test-first programming and unit tests, which are techniques that can help improve the quality of your program by making it easier to debug and reducing the number of errors in the first place. Although these concepts are applicable to any high level programming language, this course uses Python for all its examples and exercises, and attendees are expected to be familiar with basic Python syntax and concepts. The aim of this course is to teach attendees how to improve their programs both through the systematic use of tests and also by designing their programs so that it is easy to test each of the program's functions.
As this course is part of the Scientific Computing series, most of the examples used in this course are of greatest relevance to scientific programming.
Duration: One half-day session.
Sessions:
Number of sessions: 1
| Date | Time | Venue | Trainer |
|---|---|---|---|
| Tue 19 Jun | 14:15 - 17:00 | University Computing Service, Phoenix Teaching Room | Bruce Beckles |
Format: Presentations, demonstrations and exercises
Prerequisites:
- Prior attendance at the "Python Introductionfor Absolute Beginners" course or equivalent experience.
- Some experience of object oriented programming (OOP) concepts as implemented in Python, such as might be obtained from the "Object Oriented Programming: Introduction" course.
- Experience of writing programs that perform scientific computing tasks.
- Although not a prerequisite, it would be advantageous if attendees had previously attended the "Writing Better Programs: Program Design" course.
- Familiarity with a plain text editor (e.g. Emacs, gedit, Pico, vi) on a Unix system as might be obtained from either the Emacs or vi Editor introductory courses.
Topics covered:
- Test-first programming
- Unit tests
- Unit tests in Python: the unittest module
- Designing appropriate tests for your functions
- Structuring your program for testing
Taught using: Python v 2.x on MCS Linux
Notes:
- This is course is UNSUITABLE for those with little or no Python programming experience.
- Attendees of this course may also be interested in the "Program Design" and "Program Debugging" courses.
Themes:
