תוכן מסופק על ידי Brian Okken. כל תוכן הפודקאסטים כולל פרקים, גרפיקה ותיאורי פודקאסטים מועלים ומסופקים ישירות על ידי Brian Okken או שותף פלטפורמת הפודקאסט שלהם. אם אתה מאמין שמישהו משתמש ביצירה שלך המוגנת בזכויות יוצרים ללא רשותך, אתה יכול לעקוב אחר התהליך המתואר כאן https://he.player.fm/legal.
Player FM - אפליקציית פודקאסט
התחל במצב לא מקוון עם האפליקציה Player FM !
התחל במצב לא מקוון עם האפליקציה Player FM !
unittest expectedFailure and xfail
MP3•בית הפרקים
Manage episode 304625795 series 2508404
תוכן מסופק על ידי Brian Okken. כל תוכן הפודקאסטים כולל פרקים, גרפיקה ותיאורי פודקאסטים מועלים ומסופקים ישירות על ידי Brian Okken או שותף פלטפורמת הפודקאסט שלהם. אם אתה מאמין שמישהו משתמש ביצירה שלך המוגנת בזכויות יוצרים ללא רשותך, אתה יכול לעקוב אחר התהליך המתואר כאן https://he.player.fm/legal.
xfail isn't just for pytest tests. Python's unittest has @unittest.expectedFailure.
In this episode, we cover:
- using @unittest.expectedFailure
- the results of passing and failing tests with expectedFailure
- using pytest as a test runner for unittest
- using pytest markers on unittest tests
Docs for expectedFailure:
https://docs.python.org/3/library/unittest.html#skipping-tests-and-expected-failures
Some sample code.
unittest only:
unittest with pytest markers:import unittest import pytest class ExpectedFailureTestCase(unittest.TestCase): @pytest.mark.xfail def test_fail(self): self.assertEqual(1, 0, "broken") @pytest.mark.xfail def test_pass(self): self.assertEqual(1, 1, "not broken")
Full Transcript
219 פרקים
MP3•בית הפרקים
Manage episode 304625795 series 2508404
תוכן מסופק על ידי Brian Okken. כל תוכן הפודקאסטים כולל פרקים, גרפיקה ותיאורי פודקאסטים מועלים ומסופקים ישירות על ידי Brian Okken או שותף פלטפורמת הפודקאסט שלהם. אם אתה מאמין שמישהו משתמש ביצירה שלך המוגנת בזכויות יוצרים ללא רשותך, אתה יכול לעקוב אחר התהליך המתואר כאן https://he.player.fm/legal.
xfail isn't just for pytest tests. Python's unittest has @unittest.expectedFailure.
In this episode, we cover:
- using @unittest.expectedFailure
- the results of passing and failing tests with expectedFailure
- using pytest as a test runner for unittest
- using pytest markers on unittest tests
Docs for expectedFailure:
https://docs.python.org/3/library/unittest.html#skipping-tests-and-expected-failures
Some sample code.
unittest only:
unittest with pytest markers:import unittest import pytest class ExpectedFailureTestCase(unittest.TestCase): @pytest.mark.xfail def test_fail(self): self.assertEqual(1, 0, "broken") @pytest.mark.xfail def test_pass(self): self.assertEqual(1, 1, "not broken")
Full Transcript
219 פרקים
כל הפרקים
×ברוכים הבאים אל Player FM!
Player FM סורק את האינטרנט עבור פודקאסטים באיכות גבוהה בשבילכם כדי שתהנו מהם כרגע. זה יישום הפודקאסט הטוב ביותר והוא עובד על אנדרואיד, iPhone ואינטרנט. הירשמו לסנכרון מנויים במכשירים שונים.