Focus & Skip broken for unittest.TestCase decorated by @patch
Đang mở
bug
help wanted
Python Unittest
- Ngôn ngữ chính
- Python
- Star
- 149
- Fork
- 62
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
For unittest.TestCase classes that are decorated with https://docs.python.org/3/library/unittest.mock.html#patch, when we do ftest or xtest, the decorator does to patch these methods, and we get a TypeError when running the test.
This happens because @patch is evaluated on the class loading, and it patches all methods there that begin with "test". Since ftest and xtest don't match the search, they're not decorated, and become broken.
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.