ข้ามไปยังเนื้อหาหลัก
บ้านPython

Courses

Introduction to Testing in Python

ขั้นสูงระดับทักษะ
อัปเดตแล้ว 06/2568
Master Python testing: Learn methods, create checks, and ensure error-free code with pytest and unittest.
เริ่มเรียนคอร์สฟรี
PythonProgramming
4 ชม.
16 videos
53 Exercises
4,350 เอ็กซ์พี
24,855
ใบรับรองความสำเร็จ

สร้างบัญชีฟรีของคุณ

ดำเนินการต่อด้วย Googleแสดงตัวเลือกเพิ่มเติม

หรือ


เมื่อดำเนินการต่อ คุณยอมรับ ข้อกำหนดการใช้งาน ของเรา นโยบายความเป็นส่วนตัว ของเรา และยอมรับว่าข้อมูลของคุณจะถูกจัดเก็บในสหรัฐอเมริกา

เป็นที่ชื่นชอบของผู้เรียนในบริษัทนับพันแห่ง

Group

ฝึกอบรมทีมอยู่หรือ?

ลองใช้สำหรับธุรกิจ

คำอธิบายหลักสูตร

Why tests?

Plenty of people write code. Some of them make it work and profitable. But sometimes, even the smartest of the best programmers makes a mistake that can cost millions of dollars. How to decrease the possibility of getting into such a fiasco? How do you ensure that you create a program that does exactly what you want? The very simple answer is: write tests!

Python testing basics

During this journey, you will learn the very basics of creating tests in Python. You will meet four types of software testing methods. You will create your own tests to check if the program or a data pipeline works as expected before it goes to production. Whether it is the unexpected null, a typo in your dataset, or mixed-up signs in the equation. You can, and you will catch those cases with the tests.

Testing with pytest and unittest

After the course completion, you will know the types of testing methods, and you will be able to choose the most suitable ones for a specific context. You also will be able to design those tests and implement them in Python using the `pytest` and the `unittest` libraries.

ข้อกำหนดเบื้องต้น

Writing Functions in PythonSoftware Engineering Principles in Python
1

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.
เริ่มบทเรียน
Introduction to Testing in Python
เรียนจบคอร์สแล้ว

รับใบรับรองความสำเร็จ

เพิ่มข้อมูลรับรองนี้ลงในโปรไฟล์ LinkedIn, เรซูเม่ หรือ CV ของคุณ
แชร์บนโซเชียลมีเดียและในการประเมินผลงานของคุณ
สมัครเลย

เข้าร่วมกับผู้เรียนกว่า 19 ล้านคน และเริ่มIntroduction to Testing in Pythonวันนี้!

สร้างบัญชีฟรีของคุณ

ดำเนินการต่อด้วย Googleแสดงตัวเลือกเพิ่มเติม

หรือ


เมื่อดำเนินการต่อ คุณยอมรับ ข้อกำหนดการใช้งาน ของเรา นโยบายความเป็นส่วนตัว ของเรา และยอมรับว่าข้อมูลของคุณจะถูกจัดเก็บในสหรัฐอเมริกา

พัฒนาทักษะด้านข้อมูลของคุณด้วย DataCamp for Mobile

พัฒนาทักษะได้ทุกที่ทุกเวลาด้วยคอร์สเรียนบนมือถือและแบบฝึกหัดเขียนโค้ดประจำวัน 5 นาทีของเรา