
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
7 questions
ECN 01 - INTRO
Presentation
•
KG
6 questions
English A1 Breaktrought
Presentation
•
University
6 questions
what do you know about me?
Presentation
•
University
6 questions
OG9B - LISTENING - 5 THANG 12 (DRAFTING)
Presentation
•
University
6 questions
job interview material
Presentation
•
University
6 questions
UNIV 110 Week 2
Presentation
•
University
6 questions
Upper 2 Review Units 7 and 8
Presentation
•
University
7 questions
Media and Lit
Presentation
•
12th Grade
Popular Resources on Wayground
20 questions
Math Review
Quiz
•
3rd Grade
15 questions
Fast food
Quiz
•
7th Grade
20 questions
Context Clues
Quiz
•
6th Grade
20 questions
Inferences
Quiz
•
4th Grade
19 questions
Classifying Quadrilaterals
Quiz
•
3rd Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
10 questions
Identify Fractions, Mixed Numbers & Improper Fractions
Quiz
•
3rd - 4th Grade
Discover more resources for Computers
20 questions
Guess The App
Quiz
•
KG - Professional Dev...
11 questions
NFL Football logos
Quiz
•
KG - Professional Dev...
19 questions
Minecraft
Quiz
•
6th Grade - Professio...
40 questions
8th Grade Math Review
Quiz
•
8th Grade - University
20 questions
Block Buster Movies
Quiz
•
10th Grade - Professi...
10 questions
Would you rather...
Quiz
•
KG - University
40 questions
Flags of the World
Quiz
•
KG - Professional Dev...
14 questions
Superhero
Quiz
•
1st Grade - University