Do less work when testing your Python code, but be just as expressive, just as elegant, and just as readable. The pytest testing framework helps you write tests quickly and keep them readable and maintainable - with no boilerplate code. Using a robust yet simple fixture model, it's just as easy to write small tests with pytest as it is to scale up to complex functional testing for applications, packages, and libraries. This book shows you how.
For Python-based projects, pytest is the undeniable choice to test your code if you're looking for a full-featured, API-independent, flexible, and extensible testing framework. With a full-bodied fixture model that is unmatched in any other tool, the pytest framework gives you powerful features such as assert rewriting and plug-in capability - with no boilerplate code.
With simple step-by-step instructions and sample code, this book gets you up to speed quickly on this easy-to-learn and robust tool. Write short, maintainable tests that elegantly express what you're testing. Add powerful testing features and still speed up test times by distributing tests across multiple processors and running tests in parallel. Use the built-in assert statements to reduce false test failures by separating setup and test failures. Test error conditions and corner cases with expected exception testing, and use one test to run many test cases with parameterized testing. Extend pytest with plugins, connect it to continuous integration systems, and use it in tandem with tox, mock, coverage, unittest, and doctest.
Write simple, maintainable tests that elegantly express what you're testing and why.
What You Need:
The examples in this book are written using Python 3.6 and pytest 3.0. However, pytest 3.0 supports Python 2.6, 2.7, and Python 3.3-3.6.
"synopsis" may belong to another edition of this title.
Brian Okken is a lead software engineer with two decades of R&D experience developing test and measurement instruments. He hosts the Test & Code podcast and co-hosts the Python Bytes podcast.
I found Python Testing with pytest to be an eminently usable introductory guidebookto the pytest testing framework. It is already paying dividends for me at mycompany. - Chris Shaver, VP of Product, Uprising Technology
Systematic software testing, especially in the Python community, is often either completely overlooked or done in an ad hoc way. Many Python programmers are completely unaware of the existence of pytest. Brian Okken takes the trouble to show that software testing with pytest is easy, natural, and even exciting.- Dmitry Zinoviev, Author of Data Science Essentials in Python
This book is the missing chapter absent from every comprehensive Python book.- Frank Ruiz, Principal Site Reliability Engineer, Box, Inc.
"About this title" may belong to another edition of this title.
Shipping:
FREE
Within U.S.A.
Seller: SecondSale, Montgomery, IL, U.S.A.
Condition: Acceptable. Item in good condition. Textbooks may not include supplemental items i.e. CDs, access codes etc. Seller Inventory # 00069605103
Quantity: 2 available
Seller: SecondSale, Montgomery, IL, U.S.A.
Condition: Good. Item in good condition. Textbooks may not include supplemental items i.e. CDs, access codes etc. Seller Inventory # 00060406059
Quantity: 1 available
Seller: Zoom Books Company, Lynden, WA, U.S.A.
Condition: good. Book is in good condition and may include underlining highlighting and minimal wear. The book can also include "From the library of" labels. May not contain miscellaneous items toys, dvds, etc. . We offer 100% money back guarantee and 24 7 customer service. Seller Inventory # ZBV.1680502409.G
Quantity: 1 available
Seller: Seattle Goodwill, Seattle, WA, U.S.A.
paperback. Condition: Good. May have some shelf-wear due to normal use. Your purchase funds free job training and education in the greater Seattle area. Thank you for supporting Goodwill's nonprofit mission! Seller Inventory # 0KVOFY006QKS_ns
Quantity: 1 available
Seller: Book Deals, Tucson, AZ, U.S.A.
Condition: Good. Good condition. This is the average used book, that has all pages or leaves present, but may include writing. Book may be ex-library with stamps and stickers. 0.9. Seller Inventory # 353-1680502409-gdd
Quantity: 1 available
Seller: ThriftBooks-Dallas, Dallas, TX, U.S.A.
Paperback. Condition: Very Good. No Jacket. May have limited writing in cover pages. Pages are unmarked. ~ ThriftBooks: Read More, Spend Less 0.9. Seller Inventory # G1680502409I4N00
Quantity: 1 available
Seller: ThriftBooks-Dallas, Dallas, TX, U.S.A.
Paperback. Condition: Good. No Jacket. Pages can have notes/highlighting. Spine may show signs of wear. ~ ThriftBooks: Read More, Spend Less 0.9. Seller Inventory # G1680502409I3N00
Quantity: 1 available
Seller: ThriftBooks-Dallas, Dallas, TX, U.S.A.
Paperback. Condition: Fair. No Jacket. Readable copy. Pages may have considerable notes/highlighting. ~ ThriftBooks: Read More, Spend Less 0.9. Seller Inventory # G1680502409I5N00
Quantity: 1 available
Seller: HPB-Red, Dallas, TX, U.S.A.
Paperback. Condition: Good. Connecting readers with great books since 1972! Used textbooks may not include companion materials such as access codes, etc. May have some wear or writing/highlighting. We ship orders daily and Customer Service is our top priority! Seller Inventory # S_391572721
Quantity: 1 available
Seller: HPB-Diamond, Dallas, TX, U.S.A.
paperback. Condition: Very Good. Connecting readers with great books since 1972! Used books may not include companion materials, and may have some shelf wear or limited writing. We ship orders daily and Customer Service is our top priority! Seller Inventory # S_422753418
Quantity: 1 available