The Real Python Podcast

Building Python Unit Tests & Exploring a Data Visualization Gallery


Listen Later

How do you start adding unit tests to your Python code? Can the built-in unittest framework cover most or all of your needs? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.

We dig into a recent tutorial by Leodanis Pozo Ramos about writing unit tests using Python’s unittest. The tutorial covers organizing your tests, exploring assert methods, creating test fixtures, and debugging failing tests.

We explore a collection of Python data visualizations and tutorials from the Python Graph Gallery. The website features hundreds of charts and graphs built using popular plotting libraries. Each chart type features a foundational tutorial that introduces the structure and application.

We also share several other articles and projects from the Python community, including a news roundup, the new REPL coming in Python 3.13, a pytest daemon to 10X test iteration speed, a discussion about software friction, a Raspberry Pi document scanner, and a project for controlling time per iteration loop.

Course Spotlight: Building a Python GUI Application With Tkinter

In this video course, you’ll learn the basics of GUI programming with Tkinter, the de facto Python GUI framework. Master GUI programming concepts such as widgets, geometry managers, and event handlers. Then, put it all together by building two applications: a temperature converter and a text editor.

Topics:

  • 00:00:00 - Introduction
  • 00:02:08 - Python Software Foundation Board Election Dates for 2024
  • 00:02:35 - 2023 PSF Annual Impact Report
  • 00:03:03 - Python’s unittest: Writing Unit Tests for Your Code
  • 00:09:41 - What’s New in Python 3.13
  • 00:10:38 - The New REPL in Python 3.13
  • 00:13:39 - Best Python Chart Examples
  • 00:15:27 - Animation with text that highlights important events
  • 00:16:39 - Sankey Diagram with Python and Plotly
  • 00:18:55 - Video Course Spotlight
  • 00:20:25 - Pytest Daemon: 10X Local Test Iteration Speed
  • 00:23:58 - Software Friction
  • 00:35:41 - A Raspberry Pi Document Scanner
  • 00:39:00 - pacemaker: For Controlling Time Per Iteration Loop in Python
  • 00:41:55 - Thanks and goodbye
  • News:

    • Python Software Foundation Board Election Dates for 2024
    • 2023 PSF Annual Impact Report
    • Show Links:

      • Python’s unittest: Writing Unit Tests for Your Code – In this tutorial, you’ll learn how to use the unittest framework to create unit tests for your Python code. Along the way, you’ll also learn how to create test cases, fixtures, test suites, and more.
      • What’s New in Python 3.13 – Python 3.13 has gone into beta, which means the feature freeze is now in place. This is the official listing of the new features in 3.13. This release includes changes to the REPL, new typing features, experimental support for disabling the GIL, dead battery removal, and more.
      • The New REPL in Python 3.13 – Python 3.13 just hit feature freeze with the first beta release, and it includes a host of improvements to the REPL. Automatic indenting, block-level editing, and more make the built-in REPL more powerful and easier to use.
      • Best Python Chart Examples
      • Animation with text that highlights important events - Python Graph Gallery
      • Sankey Diagram with Python and Plotly - Python Graph Gallery
      • Pytest Daemon: 10X Local Test Iteration Speed – Discord has a large Python monolith with lots of imports, which now takes 13 seconds to start up. On the server that’s not a problem but to run a test it is. Ruby’s solution is to have a daemon that hot loads a test on a process that already has the imports completed.
      • Discussion:

        • Software Friction – Friction is everywhere in software development. Two setbacks are more than twice as bad as one setback. This article discusses the sources of software friction and what you can do about it.
        • Projects:

          • A Raspberry Pi Document Scanner
          • pacemaker: For Controlling Time Per Iteration Loop in Python
          • Additional Links:

            • unittest — Unit testing framework — Python 3.12.3 documentation
            • Testing with Python (part 1): the basics - Bite code!
            • Sankey Diagrams – A Sankey diagram says more than 1000 pie charts
            • tidytuesday: Official repo for the #tidytuesday project
            • tidytuesday - dataset_announcements
            • Chaos Monkey
            • OpenCV: OpenCV modules
            • How to Train Your Robot
            • Level up your Python skills with our expert-led courses:

              • Building a Python GUI Application With Tkinter
              • Testing Your Code With pytest
              • Creating PyQt Layouts for GUI Applications
              • Support the podcast & join our community of Pythonistas

                ...more
                View all episodesView all episodes
                Download on the App Store

                The Real Python PodcastBy Real Python

                • 4.7
                • 4.7
                • 4.7
                • 4.7
                • 4.7

                4.7

                136 ratings


                More shows like The Real Python Podcast

                View all
                Software Engineering Radio - the podcast for professional software developers by se-radio@computer.org

                Software Engineering Radio - the podcast for professional software developers

                272 Listeners

                The Changelog: Software Development, Open Source by Changelog Media

                The Changelog: Software Development, Open Source

                283 Listeners

                Data Skeptic by Kyle Polich

                Data Skeptic

                481 Listeners

                Talk Python To Me by Michael Kennedy

                Talk Python To Me

                592 Listeners

                Software Engineering Daily by Software Engineering Daily

                Software Engineering Daily

                624 Listeners

                The TWIML AI Podcast (formerly This Week in Machine Learning & Artificial Intelligence) by Sam Charrington

                The TWIML AI Podcast (formerly This Week in Machine Learning & Artificial Intelligence)

                443 Listeners

                Super Data Science: ML & AI Podcast with Jon Krohn by Jon Krohn

                Super Data Science: ML & AI Podcast with Jon Krohn

                296 Listeners

                Python Bytes by Michael Kennedy and Brian Okken

                Python Bytes

                213 Listeners

                Data Engineering Podcast by Tobias Macey

                Data Engineering Podcast

                142 Listeners

                Syntax - Tasty Web Development Treats by Wes Bos & Scott Tolinski - Full Stack JavaScript Web Developers

                Syntax - Tasty Web Development Treats

                982 Listeners

                CoRecursive: Coding Stories by Adam Gordon Bell - Software Developer

                CoRecursive: Coding Stories

                189 Listeners

                DataFramed by DataCamp

                DataFramed

                266 Listeners

                Practical AI by Practical AI LLC

                Practical AI

                189 Listeners

                The Stack Overflow Podcast by The Stack Overflow Podcast

                The Stack Overflow Podcast

                64 Listeners

                Latent Space: The AI Engineer Podcast by swyx + Alessio

                Latent Space: The AI Engineer Podcast

                77 Listeners