Sorry, your browser is not supported
To have the best experience using Skillshare, we recommend that you use one of these supported browsers.

Python Testing with Green

Nathan Stocks

Play Speed
  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x
46 Videos (3h 26m)
    • Green00d Promo90s

      1:56
    • Green02 Community & Help

      2:05
    • Green03 Your First Test

      5:25
    • Green04 File Organization

      7:52
    • Green05 Docstring

      3:02
    • Green06 assertTrue assertFalse

      1:52
    • Green07 Fail

      4:04
    • Green08 Errors

      1:53
    • Green09 Skipped

      6:47
    • Green10 expectedFailure unexpectedSuccess

      2:39
    • Green11 Fundamentals Review

      11:24
    • GreenA01 Intermediate Section Overview

      1:17
    • GreenA02 Green Target Specification

      5:21
    • GreenA03 Coverage

      11:11
    • GreenA04 Meaningful Tests Introduction

      1:06
    • GreenA04a Meaninfgul Tests Design Tool

      3:33
    • GreenA04b Readable

      4:50
    • GreenA04c Meaningful Tests Test One Outcome

      4:42
    • GreenA04d Meaningful Tests Test Boundaries

      4:19
    • GreenA04e Meaningful Tests Test Results

      4:09
    • GreenA04f Meaningful Tests Isolate the Unit

      1:37
    • GreenA04g Meaningful Tests Identify the Reason

      5:51
    • GreenA05 Unit Test Organization

      4:13
    • GreenA06 Fixtures

      13:27
    • GreenA07 assertEqual assertNotEqual

      6:26
    • GreenA08 assertGreater assertGreaterEqual assertLess assertLessEqual

      1:25
    • GreenA09 assertIs assertIsNot assertIsNone assertIsNotNone

      4:38
    • GreenA10 assertIn assertNotIn

      1:19
    • GreenA11 assertIsInstance assertNotIsInstance

      4:01
    • GreenA12 assertRaises assertRaisesRegexp

      5:20
    • GreenA13 assertAlmostEqual assertAlmostNotEqual

      3:54
    • GreenA14 assertRegexpMatches assertNotRegexpMatches

      2:16
    • GreenA15 assertItemsEqual assertCountEqual

      2:21
    • GreenA16 Skipping Tests

      3:43
    • GreenB01 Advanced Section Overview

      0:27
    • GreenB02 Mock Overview

      5:21
    • GreenB03 MagicMock Part 1

      8:19
    • GreenB04 MagicMock Part 2

      6:53
    • GreenB05 Mock Patchers

      9:35
    • GreenB07 Green Output Options

      6:10
    • GreenB08 Green Initializer and Finalizer

      4:51
    • GreenB09 Green Number of Processes

      4:10
    • GreenB10 Green Config Files

      3:03
    • GreenB11 Green bash and zsh tab completion

      2:26
    • GreenB12 Green Fail Fast

      1:44
    • GreenB13 Temporary Files and Directories

      2:36

About This Class

4073c345

Ever wonder why some projects seem able to make huge changes and still ship promptly, while others collapse under the weight of their own code? Testing is the difference! Effective tests enable you to add features quickly, refactor your code without fear, and ship new releases without big new bugs.

Make Your Project Successful by Writing Meaningful Tests

  • Layout your test packages and modules correctly
  • Organize your tests effectively
  • Learn the tools in the unittest module
  • Run your test with Green, a powerful new test runner
  • Write meaningful tests that enable quick refactoring
  • Learn the difference between unit and integration tests
  • Use advanced tips and tricks to get the most out of your tests.

Python Testing with Green

Tests are just a way of writing code that uses your project and makes sure that it really does what you think it does!  We'll learn the best way to write tests and some common problems and pitfalls that you should avoid.  

This course is designed as a practical reference for Python programmers who have real code that they would like to start testing, or test more effectively. I provide real runnable examples that you can type in yourself or download from the resources section.

The beginner section requires zero prior testing knowledge.  I teach the fundamental basics of testing Python code including how to run your tests the "traditional" way as well as with the high-performance Green test runner.  After completing this section, you will be able to write tests and run them.

The intermediate section teaches you how to write meaningful tests, and covers every aspect of the Python "unittest" module that you will use in daily life.  Upon completing this section, you will know more than most Python programmers about how to test your code.

In the advanced section I go over how to mock unit tests, integration testing, advanced usage of the Green test runner, and some tips and tricks for getting the most out of your testing.  Only an elite few gain this level of knowledge on their own.  After completing this section, you will be a master of Python testing.