Udemy
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
Development
Web Development Data Science Mobile Development Programming Languages Game Development Database Design & Development Software Testing Software Engineering Development Tools No-Code Development
Business
Entrepreneurship Communications Management Sales Business Strategy Operations Project Management Business Law Business Analytics & Intelligence Human Resources Industry E-Commerce Media Real Estate Other Business
Finance & Accounting
Accounting & Bookkeeping Compliance Cryptocurrency & Blockchain Economics Finance Finance Cert & Exam Prep Financial Modeling & Analysis Investing & Trading Money Management Tools Taxes Other Finance & Accounting
IT & Software
IT Certification Network & Security Hardware Operating Systems Other IT & Software
Office Productivity
Microsoft Apple Google SAP Oracle Other Office Productivity
Personal Development
Personal Transformation Personal Productivity Leadership Career Development Parenting & Relationships Happiness Esoteric Practices Religion & Spirituality Personal Brand Building Creativity Influence Self Esteem & Confidence Stress Management Memory & Study Skills Motivation Other Personal Development
Design
Web Design Graphic Design & Illustration Design Tools User Experience Design Game Design Design Thinking 3D & Animation Fashion Design Architectural Design Interior Design Other Design
Marketing
Digital Marketing Search Engine Optimization Social Media Marketing Branding Marketing Fundamentals Marketing Analytics & Automation Public Relations Advertising Video & Mobile Marketing Content Marketing Growth Hacking Affiliate Marketing Product Marketing Other Marketing
Lifestyle
Arts & Crafts Beauty & Makeup Esoteric Practices Food & Beverage Gaming Home Improvement Pet Care & Training Travel Other Lifestyle
Photography & Video
Digital Photography Photography Portrait Photography Photography Tools Commercial Photography Video Design Other Photography & Video
Health & Fitness
Fitness General Health Sports Nutrition Yoga Mental Health Dieting Self Defense Safety & First Aid Dance Meditation Other Health & Fitness
Music
Instruments Music Production Music Fundamentals Vocal Music Techniques Music Software Other Music
Teaching & Academics
Engineering Humanities Math Science Online Education Social Science Language Teacher Training Test Prep Other Teaching & Academics
AWS Certification Microsoft Certification AWS Certified Solutions Architect - Associate AWS Certified Cloud Practitioner CompTIA A+ Cisco CCNA Amazon AWS CompTIA Security+ AWS Certified Developer - Associate
Graphic Design Photoshop Adobe Illustrator Drawing Digital Painting InDesign Character Design Canva Figure Drawing
Life Coach Training Neuro-Linguistic Programming Personal Development Mindfulness Personal Transformation Meditation Life Purpose Coaching Neuroscience
Web Development JavaScript React CSS Angular PHP WordPress Node.Js Python
Google Flutter Android Development iOS Development Swift React Native Dart Programming Language Mobile Development Kotlin SwiftUI
Digital Marketing Google Ads (Adwords) Social Media Marketing Google Ads (AdWords) Certification Marketing Strategy Internet Marketing YouTube Marketing Email Marketing Retargeting
SQL Microsoft Power BI Tableau Business Analysis Business Intelligence MySQL Data Analysis Data Modeling Big Data
Business Fundamentals Entrepreneurship Fundamentals Business Strategy Online Business Business Plan Startup Freelancing Blogging Home Business
Unity Game Development Fundamentals Unreal Engine C# 3D Game Development C++ 2D Game Development Unreal Engine Blueprints Blender
30-Day Money-Back Guarantee

This course includes:

  • 2 hours on-demand video
  • 13 downloadable resources
  • Full lifetime access
  • Access on mobile and TV
Development Software Testing Unit Testing

Unit Testing and Test Driven Development in Python

Learning the discipline of Test Driven Development (also known as TDD) Using the Python Programming Language
Rating: 4.1 out of 54.1 (1,094 ratings)
4,979 students
Created by Richard Wells
Last updated 1/2019
English
English [Auto]
30-Day Money-Back Guarantee

What you'll learn

  • How to implement unit tests in python using the discipline of Test Driven Development.
  • How to use test doubles to decouple production code from the rest of the system to be tested in isolation.
Curated for the Udemy for Business collection

Course content

8 sections • 23 lectures • 2h 3m total length

  • Preview02:28

  • What is Unit Testing?
    03:49
  • What is Test Driven Development?
    04:37
  • Preview16:22
  • Unit Testing and Test Driven Development Quiz
    5 questions

  • Python Virtual Environments
    05:52
  • Setting up Pytest in PyCharm
    03:34
  • Setting up Pytest in Eclipse PyDev
    04:09

  • Pytest Overview
    02:02
  • Test Discovery
    02:16
  • XUnit Style Setup and Teardown
    05:43
  • Test Fixtures
    08:45
  • Assert Statements and Exceptions
    03:10
  • PyTest Command Line Arguments
    04:30

  • Overview
    01:34
  • Setup and 1st Test Case
    02:07
  • Add Items, Add Item Prices, and Calculate Current Total
    06:55
  • Add Multiple Items and Calculate Total
    02:27
  • Add and Apply Discounts
    15:26
  • Throw Exception when Adding an Item with No Price
    02:05

  • Overview of Test Doubles, unitest.mock, and monkeypatch
    06:49
  • unittest.mock Example
    11:17
  • Test Doubles Quiz
    5 questions

  • TDD Best Practices
    04:51

  • Conclusion
    02:22

Requirements

  • You should be familiar with the python programming language.
  • You should have Python 2.7 or Python 3 installed.

Description

Test Driven Development is a key discipline every software developer should practice to ensure the quality of their code.  In this course I'll show you how to use this discipline in your everyday coding practices to help ensure the quality of your code base.

  • In this course we’ll be going over:

    • What is Unit Testing and Test Driven Development and how does it help you.

    • What is the PyTest testing library and how is it used for writing unit tests in Python.

    • How to setup some common Python development environments to use PyTest.

    • What are Test Doubles and how do you implement and use them with unittest.mock.

    • What are some Best Practices for unit testing and Test Driven Development.

    • We’ll also walk through some hands on example programming sessions using TDD in Python.

Who this course is for:

  • Anyone who wants to write better python code faster.

Instructor

Richard Wells
Professional software engineer passionate about quality code
Richard Wells
  • 4.1 Instructor Rating
  • 2,129 Reviews
  • 10,808 Students
  • 3 Courses

I'm a software engineer with over twenty years of experience.  I've worked professionally writing code in Assembly, C, C++, Java, C#, Javascript and Python and I am knowledgeable with the entire software development life cycle.  I've written system requirements, software requirements, use cases, and user stories.  I'm an avid practicer of Agile, Scrum, and Extreme Programming disciplines.  I'm passionate about the process of writing quality software fast.

  • Udemy for Business
  • Teach on Udemy
  • Get the app
  • About us
  • Contact us
  • Careers
  • Blog
  • Help and Support
  • Affiliate
  • Terms
  • Privacy policy
  • Cookie settings
  • Sitemap
  • Featured courses
Udemy
© 2021 Udemy, Inc.