Artwork

Real Python에서 제공하는 콘텐츠입니다. 에피소드, 그래픽, 팟캐스트 설명을 포함한 모든 팟캐스트 콘텐츠는 Real Python 또는 해당 팟캐스트 플랫폼 파트너가 직접 업로드하고 제공합니다. 누군가가 귀하의 허락 없이 귀하의 저작물을 사용하고 있다고 생각되는 경우 여기에 설명된 절차를 따르실 수 있습니다 https://ko.player.fm/legal.
Player FM -팟 캐스트 앱
Player FM 앱으로 오프라인으로 전환하세요!

Eric Matthes: Maybe Don't Start With Unit Tests

1:10:48
 
공유
 

Manage episode 470148880 series 2637014
Real Python에서 제공하는 콘텐츠입니다. 에피소드, 그래픽, 팟캐스트 설명을 포함한 모든 팟캐스트 콘텐츠는 Real Python 또는 해당 팟캐스트 플랫폼 파트너가 직접 업로드하고 제공합니다. 누군가가 귀하의 허락 없이 귀하의 저작물을 사용하고 있다고 생각되는 경우 여기에 설명된 절차를 따르실 수 있습니다 https://ko.player.fm/legal.

Should you always start testing your code with unit tests? When does it make sense to look at integration or end-to-end testing as a first step instead? This week on the show, we speak with previous guest Eric Matthes about where to begin testing your code.

Eric is the author of the popular book Python Crash Course. Early in the development of the book, he decided to introduce testing and added a chapter on testing code with pytest.

Over the past couple of years, Eric has continued to consider when and where to test a project’s code. He thinks there are hazards to always starting with unit tests. The type of project and its audience should determine what kind of testing to employ initially.

We discuss using pytest to develop integration tests on multiple types of projects. We also explore fixtures and what goes into building a test suite. Eric also shares criteria for when and where it makes sense to add unit tests to a project.

Course Spotlight: Using Python’s assert to Debug and Test Your Code

In this course, you’ll learn how to use Python’s assert statement to document, debug, and test code in development. You’ll learn how assertions might be disabled in production code, so you shouldn’t use them to validate data. You’ll also learn about a few common pitfalls of assertions in Python.

Topics:

  • 00:00:00 – Introduction
  • 00:01:47 – Submitting talks to conferences
  • 00:04:10 – Don’t start with unit tests!
  • 00:07:35 – How did you start with testing?
  • 00:11:30 – Example of a project needing tests
  • 00:14:54 – Defining types of tests
  • 00:16:44 – Integration vs end-to-end tests
  • 00:19:09 – When should you build tests?
  • 00:22:13 – Trade offs of integration vs unit tests
  • 00:24:05 – Why is there push back on this idea?
  • 00:27:36 – Video Course Spotlight
  • 00:29:09 – Using pytest
  • 00:33:24 – Transcripts project example
  • 00:37:03 – py-image-border project
  • 00:40:29 – Criteria for when you should write unit tests
  • 00:48:51 – How to practice writing tests
  • 00:50:28 – Building an integration test and pytest fixtures
  • 00:55:05 – What’s in the test folder?
  • 00:56:31 – Idea for a PyCon tutorial on implementing tests
  • 00:57:29 – Other pytest advice and parametrization
  • 01:01:13 – Caveats to not starting with unit tests
  • 01:02:30 – pytest documentation and other advice
  • 01:05:23 – How to reach Eric online
  • 01:06:47 – What are you excited about in the world of Python?
  • 01:08:23 – What do you want to learn next?
  • 01:09:48 – What conferences are you attending?
  • 01:10:06 – Thanks and goodbye

Show Links:

Level up your Python skills with our expert-led courses:

Support the podcast & join our community of Pythonistas

  continue reading

269 에피소드

Artwork
icon공유
 
Manage episode 470148880 series 2637014
Real Python에서 제공하는 콘텐츠입니다. 에피소드, 그래픽, 팟캐스트 설명을 포함한 모든 팟캐스트 콘텐츠는 Real Python 또는 해당 팟캐스트 플랫폼 파트너가 직접 업로드하고 제공합니다. 누군가가 귀하의 허락 없이 귀하의 저작물을 사용하고 있다고 생각되는 경우 여기에 설명된 절차를 따르실 수 있습니다 https://ko.player.fm/legal.

Should you always start testing your code with unit tests? When does it make sense to look at integration or end-to-end testing as a first step instead? This week on the show, we speak with previous guest Eric Matthes about where to begin testing your code.

Eric is the author of the popular book Python Crash Course. Early in the development of the book, he decided to introduce testing and added a chapter on testing code with pytest.

Over the past couple of years, Eric has continued to consider when and where to test a project’s code. He thinks there are hazards to always starting with unit tests. The type of project and its audience should determine what kind of testing to employ initially.

We discuss using pytest to develop integration tests on multiple types of projects. We also explore fixtures and what goes into building a test suite. Eric also shares criteria for when and where it makes sense to add unit tests to a project.

Course Spotlight: Using Python’s assert to Debug and Test Your Code

In this course, you’ll learn how to use Python’s assert statement to document, debug, and test code in development. You’ll learn how assertions might be disabled in production code, so you shouldn’t use them to validate data. You’ll also learn about a few common pitfalls of assertions in Python.

Topics:

  • 00:00:00 – Introduction
  • 00:01:47 – Submitting talks to conferences
  • 00:04:10 – Don’t start with unit tests!
  • 00:07:35 – How did you start with testing?
  • 00:11:30 – Example of a project needing tests
  • 00:14:54 – Defining types of tests
  • 00:16:44 – Integration vs end-to-end tests
  • 00:19:09 – When should you build tests?
  • 00:22:13 – Trade offs of integration vs unit tests
  • 00:24:05 – Why is there push back on this idea?
  • 00:27:36 – Video Course Spotlight
  • 00:29:09 – Using pytest
  • 00:33:24 – Transcripts project example
  • 00:37:03 – py-image-border project
  • 00:40:29 – Criteria for when you should write unit tests
  • 00:48:51 – How to practice writing tests
  • 00:50:28 – Building an integration test and pytest fixtures
  • 00:55:05 – What’s in the test folder?
  • 00:56:31 – Idea for a PyCon tutorial on implementing tests
  • 00:57:29 – Other pytest advice and parametrization
  • 01:01:13 – Caveats to not starting with unit tests
  • 01:02:30 – pytest documentation and other advice
  • 01:05:23 – How to reach Eric online
  • 01:06:47 – What are you excited about in the world of Python?
  • 01:08:23 – What do you want to learn next?
  • 01:09:48 – What conferences are you attending?
  • 01:10:06 – Thanks and goodbye

Show Links:

Level up your Python skills with our expert-led courses:

Support the podcast & join our community of Pythonistas

  continue reading

269 에피소드

모든 에피소드

×
 
Loading …

플레이어 FM에 오신것을 환영합니다!

플레이어 FM은 웹에서 고품질 팟캐스트를 검색하여 지금 바로 즐길 수 있도록 합니다. 최고의 팟캐스트 앱이며 Android, iPhone 및 웹에서도 작동합니다. 장치 간 구독 동기화를 위해 가입하세요.

 

빠른 참조 가이드

탐색하는 동안 이 프로그램을 들어보세요.
재생