Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix silently skipped async tests (idb)
Summary: When using `unittest.TestCase`, any coroutines that look like test cases won't be awaited properly, causing the test to pass immediately. This diff fixes these test cases by switching to `unittest.IsolatedAsyncioTestCase` which will start properly running these tests. I fully expect red signal on this diff, but will still land it, because a failing test is better than a silently skipped one. This diff was produced by: ``` sl go D57273213 cd fbcode arc lint --take FIXIT --paths-cmd 'hg files -I "**/*.py" | grep test' -a HG: manually revert unrelated fixit changes sl st | awk '{print $2}' | xargs pylot run fbcode//python/libcst/ codemod ensure_import_present.EnsureImportPresentCommand --module unittest --entity IsolatedAsyncioTestCase sl st | awk '{print $2}' | xargs pylot run fbcode//python/libcst/ codemod remove_unused_imports.RemoveUnusedImportsWithGlean HG: manually add back these unused imports unrelated to this change: P1370679492 HG: split the diff per oncall ./scripts/zsol/split.sh ``` Reviewed By: Nekitosss Differential Revision: D57771323 fbshipit-source-id: efb6632235e6be396fdddace969e9c480f7aea53
- Loading branch information