Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
Which of the following method is used to catch exceptions in a test, with unittest?
Home
Python
Which of the following method is used to catch exceptions in a test, with unittest?
asked
Jun 30, 2020
in
Python
by
GeorgeBell
(
5.1k
points)
Q> Which of the following method is used to catch exceptions in a test, with unittest?
1). assertRaises
2). assertCatch
3). assert
4). assertException
#python
Python-questions-answers
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Jun 30, 2020
by
GeorgeBell
(
5.1k
points)
Ans is assertRaises
Related questions
0
votes
Q: Q. Which of the following decorator is used to skip a test if a given condition is false, with unittest?
asked
Jun 30, 2020
in
Python
by
GeorgeBell
(
5.1k
points)
#python
Python-questions-answers
0
votes
Q: What is the parent class from which a Test class has to be derived for running it with unittest?
asked
Jun 30, 2020
in
Python
by
GeorgeBell
(
5.1k
points)
#python
Python-questions-answers
0
votes
Q: Which of the following method is used to check equality of two lists in a test, with unitest?
asked
Jun 30, 2020
in
Python
by
GeorgeBell
(
5.1k
points)
#python
Python-questions-answers
0
votes
Q: Which of the following commands run only one test case , present in sample_module.py using unittest?
asked
Jun 30, 2020
in
Python
by
GeorgeBell
(
5.1k
points)
#python
Python-questions-answers
0
votes
Q: Test discovery is simpler in unittest than in nose. State true or false.
asked
Jul 16, 2020
in
Python
by
GeorgeBell
(
5.1k
points)
#python
Python-questions-answers
0
votes
Q: Test discovery is simpler in unittest than in nose. State true or false.
asked
Jul 2, 2020
in
Python
by
GeorgeBell
(
5.1k
points)
#python
Python-questions-answers
0
votes
Q: Which of the following decorator is used to skip a test unconditionally, with pytest?
asked
Jul 16, 2020
in
Python
by
GeorgeBell
(
5.1k
points)
#python
Python-questions-answers
+1
vote
Q: How many tests of sample_module.py shown below, are successfully passed, when run with unittest?
asked
Jul 16, 2020
in
Python
by
GeorgeBell
(
5.1k
points)
#python
Python-questions-answers
...