Focus & Skip broken for unittest.TestCase decorated by @patch
未關閉
bug
help wanted
Python Unittest
- 主要語言
- Python
- 星號
- 149
- 分支
- 62
- PR 合併指標
- 30 天內沒有已合併 PR
描述
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.
貢獻指南
評估
這個 Issue 還沒有評估資料。