Congratulations!

Introduction to Testing in Python

Alexander Levin

Data Scientist

Chapter 1 - Creating tests with pytest

  • Testing and pytest
  • CLI: pytest test_script.py
  • Test markers

test output example

Introduction to Testing in Python

Chapter 2 - Pytest fixtures

  • Introduction to fixtures
  • Chain fixtures requests fixture calls other fixture

  • Fixtures autouse

  • Fixtures teardown
Introduction to Testing in Python

Chapter 3 - Basic Testing Types

  • Unit testing
  • Feature testing
  • Integration testing
  • Performance testing
Introduction to Testing in Python

Chapter 4 - Writing tests with unittest

  • Meeting the unittest
    import unittest
    class TestSquared(unittest.TestCase):
      def test_negative(self):
          self.assertEqual((-3) ** 2, 9)
    
  • Unittest CLI output of unittest test_sqneg.py

  • Fixtures in unittest

  • Practical examples
Introduction to Testing in Python

Congratulations!

Introduction to Testing in Python

Preparing Video For Download...