강의
Python 테스트 입문
고급기술 수준
업데이트됨 2025. 6.
PythonProgramming4시간16 동영상53 연습 문제4,350 XP24,987성취 증명서
무료 계정 만들기
Google에서 계속 진행더 많은 옵션 보기또는
수천 개 기업의 학습자들이 사랑하는
팀을 교육하시나요?
비즈니스용으로 체험해 보세요강의 설명
왜 테스트를 할까요?
많은 사람들이 코드를 작성합니다. 그중 일부는 이를 작동하게 만들고 수익성 있게 만듭니다. 하지만 때로는 최고의 프로그래머 중 가장 똑똑한 사람조차 수백만 달러의 손실을 초래할 수 있는 실수를 저지르기도 합니다. 그런 참사에 휘말릴 가능성을 어떻게 줄일 수 있을까요? 원하는 대로 정확히 작동하는 프로그램을 어떻게 만들 수 있을까요? 아주 간단한 답은: 테스트를 작성하세요!Python 테스트 기초
이 과정에서는 Python에서 테스트를 만드는 가장 기본적인 내용을 배우게 됩니다. 소프트웨어 테스트 방법의 네 가지 유형을 만나보게 됩니다. 프로그램이나 데이터 파이프라인이 프로덕션에 배포되기 전에 예상대로 작동하는지 확인하기 위해 직접 테스트를 작성하게 됩니다. 예상치 못한 null이든, 데이터세트의 오타든, 방정식의 부호가 뒤섞였든. 테스트를 통해 그런 사례들을 잡아낼 수 있고, 실제로 잡아내게 될 것입니다.pytest와 unittest를 활용한 테스트
강의를 수료한 후에는 다양한 테스트 방법의 유형을 이해하고, 특정 상황에 가장 적합한 방법을 선택할 수 있게 됩니다. 또한 `pytest` 및 `unittest` 라이브러리를 사용하여 이러한 테스트를 설계하고 Python으로 구현할 수 있게 됩니다.선수 조건
Writing Functions in PythonSoftware Engineering Principles in Python1
Creating Tests with pytest
Learn what a test is and how to run the first one of your own with the pytest library! You will get used to the pytest testing framework and the command-line interface. You will also learn how to process specific contexts, like "failed tests" and "skipping the test" with pytest markers.
2
Pytest Fixtures
Learn what a fixture is and how to simplify your code by using it in tests. You will get familiar with the fixture @pytest.fixture decorator and the fixture tools. You will analyze your code to see the "fixture part" in it. Finally, learn how to use teardowns to prevent software failures.
3
Basic Testing Types
Learn what the basic testing types are and their features. Learn about test cases and how they help to implement tests. You will get more skilled with creating test functions and running pytest from CLI in IDE exercises. Finally, you will be able to differentiate the different testing types and create tests for each of them.
4
Writing tests with unittest
In this final chapter, you will meet the unittest framework. First, you will learn basic assertion methods, then its CLI interface, and how to use fixtures. Finally, you will put everything together in the practical examples of data pipelines.
Python 테스트 입문
강의 완료
19백만 명 이상의 학습자와 함께 Python 테스트 입문을(를) 시작하세요!
무료 계정 만들기
Google에서 계속 진행더 많은 옵션 보기또는
DataCamp for Mobile을 통해 데이터 분석 능력을 향상시키세요.
모바일 강좌와 매일 5분 코딩 챌린지를 통해 이동 중에도 학습 효과를 높이세요.