• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 3 fuera de 19 páginas
Examen

WGU D522 Python for IT Automation Unit 6 Testing, Debugging, Version Control and Automation Best Practices — Questions & Answers

Document preview thumbnail
Vista previa 3 fuera de 19 páginas

WGU D522 Python for IT Automation Unit 6 Testing, Debugging, Version Control and Automation Best Practices — Questions & Answers 1. What is software testing? A. Writing documentation B. Deploying code C. Installing packages D. Checking that code behaves as expected Answer: D. Checking that code behaves as expected Rationale: Quality assurance. 2. What is a unit test? A. A test of the whole system B. A test of a single small piece of code, like one function C. A user survey D. A load test Answer: B. A test of a single small piece of code, like one function Rationale: Smallest unit.

Vista previa del contenido

WGU D522 Python for IT Automation Unit 6
Testing, Debugging, Version Control and
Automation Best Practices — Questions &
Answers

1. What is software testing?
A. Writing documentation
B. Deploying code
C. Installing packages
D. Checking that code behaves as expected
Answer: D. Checking that code behaves as expected
Rationale: Quality assurance.
2. What is a unit test?
A. A test of the whole system
B. A test of a single small piece of code, like one function
C. A user survey
D. A load test
Answer: B. A test of a single small piece of code, like one function
Rationale: Smallest unit.
3. What is an integration test?
A. A single-function test
B. A style check
C. A test checking that components work together
D. A user survey
Answer: C. A test checking that components work together
Rationale: Interactions.
4. What module is Python's built-in testing framework?
A. pytest
B. nose
C. unittest
D. testlib
Answer: C. unittest
Rationale: Standard library.

,5. What is pytest?
A. A popular third-party testing framework with simple assert-based tests
B. A built-in module
C. A linter
D. A debugger
Answer: A. A popular third-party testing framework with simple assert-based
tests
Rationale: pip install pytest.
6. How does pytest discover tests by default?
A. Any file
B. Only files named tests.txt
C. Only classes named Test
D. Files named test_*.py or *_test.py with functions starting with test_
Answer: D. Files named test_*.py or *_test.py with functions starting with test_
Rationale: Conventions.
7. What does the assert statement do?
A. Prints a message
B. Raises AssertionError if a condition is false
C. Catches exceptions
D. Defines a test
Answer: B. Raises AssertionError if a condition is false
Rationale: Testing.
8. In unittest, what must test classes inherit from?
A. unittest.TestCase
B. object only
C. Exception
D. Test
Answer: A. unittest.TestCase
Rationale: unittest structure.
9. In unittest, what method name prefix identifies test methods?
A. test_
B. check_
C. run_
D. assert_
Answer: A. test_
Rationale: Naming.

, 10. What does self.assertEqual(a, b) check in unittest?
A. That a equals b
B. That a is b
C. That a is True
D. That a raises an error
Answer: A. That a equals b
Rationale: Assertion.
11. What does assertRaises check?
A. That values are equal
B. That a value is True
C. That a file exists
D. That code raises a specific exception
Answer: D. That code raises a specific exception
Rationale: Exceptions.
12. What are setUp and tearDown methods for?
A. Running only once
B. Preparing and cleaning up before and after each test
C. Deploying code
D. Writing logs
Answer: B. Preparing and cleaning up before and after each test
Rationale: Fixtures.
13. What is a pytest fixture?
A. Reusable setup code provided to tests
B. A test result
C. A bug
D. A log file
Answer: A. Reusable setup code provided to tests
Rationale: @pytest.fixture.
14. What is mocking in tests?
A. Making fun of code
B. Deleting tests
C. Replacing real objects, like network calls, with controlled fake ones
D. Running in production
Answer: C. Replacing real objects, like network calls, with controlled fake ones
Rationale: unittest.mock.
15. Why mock external services in automation tests?
A. To slow tests
B. To use real data
C. It's required
D. To test logic without depending on real servers or networks
Answer: D. To test logic without depending on real servers or networks
Rationale: Isolation.

Información del documento

Subido en
13 de noviembre de 2026
Número de páginas
19
Escrito en
2026/2027
Tipo
Examen
Contiene
Preguntas y respuestas
$14.99

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
ARVEX
3.0
(1)
Vendido
12
Seguidores
0
Artículos
3233
Última venta
1 semana hace



Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes