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

MARC

LEADER 00000cam a2200000Ii 4500
001 EBSCO_ocn899214552
003 OCoLC
005 20231017213018.0
006 m o d
007 cr unu||||||||
008 150105s2014 enka o 001 0 eng d
040 |a UMI  |b eng  |e rda  |e pn  |c UMI  |d OCLCF  |d DEBBG  |d DEBSZ  |d EBLCP  |d IDEBK  |d S4S  |d COO  |d N$T  |d YDXCP  |d AGLDB  |d ICA  |d OCLCQ  |d MERUC  |d OCLCQ  |d D6H  |d VTS  |d CEF  |d OCLCQ  |d STF  |d AU@  |d OCLCQ  |d AJS  |d OCLCQ  |d OCLCO  |d OCLCQ  |d QGK  |d OCLCO 
019 |a 897642155  |a 907300387  |a 1259247681 
020 |a 9781783553228 
020 |a 1783553227 
020 |a 1783553219 
020 |a 9781783553211 
020 |z 9781783553211 
029 1 |a CHNEW  |b 000889455 
029 1 |a CHVBK  |b 374481741 
029 1 |a DEBBG  |b BV042490499 
029 1 |a DEBBG  |b BV043613922 
029 1 |a DEBSZ  |b 434836788 
029 1 |a DEBSZ  |b 48473511X 
029 1 |a GBVCP  |b 817127747 
035 |a (OCoLC)899214552  |z (OCoLC)897642155  |z (OCoLC)907300387  |z (OCoLC)1259247681 
037 |a CL0500000520  |b Safari Books Online 
050 4 |a QA76.73.P98 
072 7 |a COM  |x 013000  |2 bisacsh 
072 7 |a COM  |x 014000  |2 bisacsh 
072 7 |a COM  |x 018000  |2 bisacsh 
072 7 |a COM  |x 067000  |2 bisacsh 
072 7 |a COM  |x 032000  |2 bisacsh 
072 7 |a COM  |x 037000  |2 bisacsh 
072 7 |a COM  |x 052000  |2 bisacsh 
082 0 4 |a 004.6186 
049 |a UAMI 
100 1 |a Arbuckle, Daniel,  |e author. 
245 1 0 |a Learning Python testing :  |b a straightforward and easy approach to testing your Python projects /  |c Daniel Arbuckle. 
250 |a Second edition. 
264 1 |a Birmingham, UK :  |b Packt Publishing,  |c 2014. 
300 |a 1 online resource (1 volume) :  |b illustrations 
336 |a text  |b txt  |2 rdacontent 
337 |a computer  |b c  |2 rdamedia 
338 |a online resource  |b cr  |2 rdacarrier 
347 |a text file 
490 1 |a Community experience distilled 
588 0 |a Online resource; title from cover (Safari, viewed December 18, 2014). 
500 |a Includes index. 
505 0 |a Cover; Copyright; Credits; About the Author; About the Reviewers; www.PacktPub.com; Table of Contents; Preface; Chapter 1: Python and Testing; Testing for fun and profit; Levels of testing; Unit testing; Integration testing; System testing; Acceptance testing; Regression testing; Test-driven development; You'll need Python; Summary; Chapter 2: Working with doctest; Where doctest performs best; The doctest language; Example -- creating and running a simple doctest; Result -- three times three does not equal ten; The syntax of doctests; Example -- a more complex test; Result -- five tests run? 
505 8 |a Expecting exceptionsExample -- checking for an exception; Result -- success at failing; Expecting blank lines; Controlling doctest behavior with directives; Ignoring part of the result; Example -- ellipsis test drive; Result -- ellipsis elides; Ignoring white space; Example -- invoking normality; Result -- white space matches any other white space; Skipping an example; Example -- humans only; Result -- it looks like a test, but it's not; The other directives; The execution scope of doctest tests; Check your understanding; Exercise -- English to doctest; Embedding doctests into docstrings. 
505 8 |a Example -- a doctest in a docstringResult -- the code is now self-documenting and self-testable; Putting it into practice -- an AVL tree; English specification; Node data; Testing the constructor; Recalculating height; Making a node deletable; Rotation; Locating a node; The rest of the specification; Summary; Chapter 3: Unit Testing with doctest; What is unit testing?; The limitations of unit testing; Example -- identifying units; Choosing units; Check your understanding; Unit testing during the development process; Design; Development; Feedback; Development, again; Later stages of the process. 
505 8 |a The basicsAssertions; The assertTrue method; The assertFalse method; The assertEqual method; The assertNotEqual method; The assertAlmostEqual method; The assertNotAlmostEqual method; The assertIs and assertIsNot methods; The assertIsNone and assertIsNotNone methods; The assertIn and assertNotIn methods; The assertIsInstance and assertNotIsInstance methods; The assertRaises method; The fail method; Make sure you get it; Test fixtures; Example -- testing database-backed units; Summary; Chapter 6: Running Your Tests with Nose; Installing Nose; Organizing tests; An example of organizing tests. 
520 |a 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. 
520 |a 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. 
546 |a English. 
590 |a eBooks on EBSCOhost  |b EBSCO eBook Subscription Academic Collection - Worldwide 
650 0 |a Python (Computer program language) 
650 0 |a Object-oriented programming (Computer science) 
650 6 |a Python (Langage de programmation) 
650 6 |a Programmation orientée objet (Informatique) 
650 7 |a COMPUTERS  |x Computer Literacy.  |2 bisacsh 
650 7 |a COMPUTERS  |x Computer Science.  |2 bisacsh 
650 7 |a COMPUTERS  |x Data Processing.  |2 bisacsh 
650 7 |a COMPUTERS  |x Hardware  |x General.  |2 bisacsh 
650 7 |a COMPUTERS  |x Information Technology.  |2 bisacsh 
650 7 |a COMPUTERS  |x Machine Theory.  |2 bisacsh 
650 7 |a COMPUTERS  |x Reference.  |2 bisacsh 
650 7 |a Object-oriented programming (Computer science)  |2 fast 
650 7 |a Python (Computer program language)  |2 fast 
776 0 8 |i Print version:  |a Arbuckle, Daniel.  |t Learning Python Testing.  |d Birmingham : Packt Publishing, ©2014  |z 9781783553211 
830 0 |a Community experience distilled. 
856 4 0 |u https://ebsco.uam.elogim.com/login.aspx?direct=true&scope=site&db=nlebk&AN=916089  |z Texto completo 
938 |a EBSCOhost  |b EBSC  |n 916089 
938 |a ProQuest MyiLibrary Digital eBook Collection  |b IDEB  |n cis30192046 
938 |a YBP Library Services  |b YANK  |n 12182475 
994 |a 92  |b IZTAP