Cargando…

Learning Python testing : a straightforward and easy approach to testing your Python projects /

Chapter 4: Decoupling Units with unittest.mock; Mock objects in general; Mock objects according to unittest.mock; Standard mock objects; Non-mock attributes; Non-mock return values and raising exceptions; Mocking class or function details; Mocking function or method side effects; Mocking containers...

Descripción completa

Detalles Bibliográficos
Clasificación:Libro Electrónico
Autor principal: Arbuckle, Daniel (Autor)
Formato: Electrónico eBook
Idioma:Inglés
Publicado: Birmingham, UK : Packt Publishing, 2014.
Edición:Second edition.
Colección:Community experience distilled.
Temas:
Acceso en línea:Texto completo
Descripción
Sumario:Chapter 4: Decoupling Units with unittest.mock; Mock objects in general; Mock objects according to unittest.mock; Standard mock objects; Non-mock attributes; Non-mock return values and raising exceptions; Mocking class or function details; Mocking function or method side effects; Mocking containers and objects with a special behavior; Mock objects for properties and descriptors; Mocking file objects; Replacing real code with mock objects; Mock objects in action; Better PID tests; Patching time.time; Decoupling from the constructor; Summary; Chapter 5: Structured Testing with unittest.
This book is ideal if you want to learn about the testing disciplines and automated testing tools from a hands-on, conversational guide. You should already know Python and be comfortable with Python 3.
Notas:Includes index.
Descripción Física:1 online resource (1 volume) : illustrations
ISBN:9781783553228
1783553227
1783553219
9781783553211