
unittest
Presentation
•
Computers
•
University
•
Medium
Michelle Craig
Used 5+ times
FREE Resource
4 Slides • 3 Questions
1
unittest
by Michelle Craig
2
Multiple Choice
A Python statement inside the if __name__ == '__main__' block of file prog.py:
is executed only when we directly run prog.py not when prog.py is imported.
is executed only when we import prog.py into another Python program.
is executed whenever prog.py is evaluated which means whenever we import prog.py or whenever we run prog.py
is only executed if we explicitly define a variable __name__ and set it to refer to the string '__main__'
3
4
Fill in the Blanks
Type answer...
5
Automatically running the docstring examples
You can avoid cutting and pasting each example into the shell by using:
import doctest
doctest.testmod()
You could put this in the if __name__ = '__main__' block
6
Open Ended
The prepare videos on test cases discussed 4 factors for consideration when creating a suite of tests. Give one of them.
7
Selecting a Good Test Suite
Size or number
Order (or placement)
Dichotomies
Thresholds (or boundaries)
unittest
by Michelle Craig
Show answer
Auto Play
Slide 1 / 7
SLIDE
Similar Resources on Wayground
3 questions
try again
Presentation
•
University
8 questions
WEEK 4 Review
Presentation
•
University
6 questions
Untitled Lesson
Presentation
•
KG - University
6 questions
CODECRAFT
Presentation
•
12th Grade
11 questions
Robotics
Presentation
•
University
6 questions
Verbs BE and DO Practice
Presentation
•
University
6 questions
HOLIDAYS
Presentation
•
University
6 questions
SOMEONE HAS TO DO IT
Presentation
•
University
Popular Resources on Wayground
24 questions
PBIS-HGMS Day 10
Quiz
•
6th - 8th Grade
10 questions
HCS SCI 03 Summer School Review 3
Quiz
•
3rd Grade
11 questions
Home Scope
Quiz
•
7th - 8th Grade
15 questions
HCS SCI 05 Summer School Assessment 3 Review
Quiz
•
5th Grade
35 questions
Lufkin Road Middle School Student Handbook & Policies Assessment
Quiz
•
7th Grade
18 questions
Geo 11.3 Area of Circles and Sectors
Quiz
•
9th - 11th Grade