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...
Clasificación: | Libro Electrónico |
---|---|
Autor principal: | |
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 |
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 |