Python testing : beginner's guide.: beginner's guide. (2010)
- Record Type:
- Book
- Title:
- Python testing : beginner's guide.: beginner's guide. (2010)
- Main Title:
- Python testing : beginner's guide.
- Other Names:
- Arbuckle, Daniel
- Contents:
- Table of Contents; Python Testing Beginner's Guide; Python Testing; Credits; About the Author; About the Reviewers; Preface; What this book covers; What you need for this book; Who this book is for; Conventions; Time for action -- heading; What just happened?; Pop quiz -- heading; Have a go hero -- heading; Reader feedback; Customer support; Errata; Piracy; Questions; 1. Testing for Fun and Profit; How can testing help?; Types of testing; Unit testing; Integration testing; System testing; You've got Python, right?; Summary; 2. Doctest: The Easiest Testing Tool; Basic doctest. Time for action -- creating and running your first doctestWhat just happened?; The syntax of doctests; Time for action -- writing a more complex test; What just happened?; Expecting exceptions; Time for action -- expecting an exception; What just happened?; Expecting blank lines in the output; Using directives to control doctest; Ignoring part of the result; Time for action -- using ellipsis in tests; What just happened?; Ignoring whitespace; Time for action -- normalizing whitespace; Skipping an example entirely; Time for action -- skipping tests; What just happened?; Other doctest directives. Execution scopePop quiz -- doctest syntax; Have a go hero -- from English to doctest; Embedding doctests in Python docstrings; Time for action -- embedding a doctest in a docstring; What just happened?; Doctest directives; Execution scope; Putting it in practice: an AVL tree; English specification; Node data;Table of Contents; Python Testing Beginner's Guide; Python Testing; Credits; About the Author; About the Reviewers; Preface; What this book covers; What you need for this book; Who this book is for; Conventions; Time for action -- heading; What just happened?; Pop quiz -- heading; Have a go hero -- heading; Reader feedback; Customer support; Errata; Piracy; Questions; 1. Testing for Fun and Profit; How can testing help?; Types of testing; Unit testing; Integration testing; System testing; You've got Python, right?; Summary; 2. Doctest: The Easiest Testing Tool; Basic doctest. Time for action -- creating and running your first doctestWhat just happened?; The syntax of doctests; Time for action -- writing a more complex test; What just happened?; Expecting exceptions; Time for action -- expecting an exception; What just happened?; Expecting blank lines in the output; Using directives to control doctest; Ignoring part of the result; Time for action -- using ellipsis in tests; What just happened?; Ignoring whitespace; Time for action -- normalizing whitespace; Skipping an example entirely; Time for action -- skipping tests; What just happened?; Other doctest directives. Execution scopePop quiz -- doctest syntax; Have a go hero -- from English to doctest; Embedding doctests in Python docstrings; Time for action -- embedding a doctest in a docstring; What just happened?; Doctest directives; Execution scope; Putting it in practice: an AVL tree; English specification; Node data; Constructor; Recalculate height; Make deletable; Rotation; Locating a node; Testing the rest of the specification; Summary; 3. Unit Testing with Doctest; What is Unit testing and what it is not?; Time for action -- identifying units; What just happened?; Pop quiz -- understanding units. Unit testing throughout the development processDesign phase; Time for action -- unit testing during design; What just happened?; Pop quiz -- unit testing during design; Have a go hero; Development phase; Time for action -- unit testing during development; What just happened?; Feedback phase; Time for action -- unit testing during feedback; What just happened?; Back to the development phase; Time for action -- unit testing during development ... again; What just happened?; Maintenance phase; Time for action -- unit testing during maintenance; What just happened?; Reuse phase. Time for action -- unit testing during reuseWhat just happened?; Pop quiz -- unit testing; Have a go hero -- test-driven development; Summary; 4. Breaking Tight Coupling by using Mock Objects; Installing Python Mocker; Time for action -- installing Python Mocker; The idea of a mock object; Python Mocker; Time for action -- exploring the basics of Mocker; What just happened?; Mocking functions; Mocking containers; Parameter matching; ANY; ARGS; KWARGS; IS; IN; CONTAINS; MATCH; Mocking complex expressions; Have a go hero; Returning iterators; Raising exceptions; Calling functions via a mock. … (more)
- Publisher Details:
- Birmingham, U.K : Packt Pub
- Publication Date:
- 2010
- Extent:
- 1 online resource (vii, 236 pages), illustrations
- Subjects:
- 005.13/3
Python (Computer program language) -- Testing
Python (Computer program language) -- Testing
COMPUTERS -- Programming Languages -- C♯
COMPUTERS -- Programming Languages -- Java
COMPUTERS -- Programming Languages -- Pascal
Python (Computer program language) -- Testing
Electronic books - Languages:
- English
- ISBNs:
- 9781847198853
1847198856 - Related ISBNs:
- 1847198848
9781847198846 - Notes:
- Note: Print version record.
- Access Rights:
- Legal Deposit; Only available on premises controlled by the deposit library and to one user at any one time; The Legal Deposit Libraries (Non-Print Works) Regulations (UK).
- Access Usage:
- Restricted: Printing from this resource is governed by The Legal Deposit Libraries (Non-Print Works) Regulations (UK) and UK copyright law currently in force.
- View Content:
- Available online (eLD content is only available in our Reading Rooms) ↗
- Physical Locations:
- British Library HMNTS - ELD.DS.89519
- Ingest File:
- 01_002.xml