-
Notifications
You must be signed in to change notification settings - Fork 770
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Things wrong with pytest: 1. It's trying to do too much and ends up getting in the way. 1.1. Most notably, rerunning tests is pretty broken - see pytest-dev/rerun-failures#51 2. Everything needs to be a fixture, instead of being compatible with argument-altering decorators. 3. Yet, parametrizing fixtures is an annoying chore. 4. Weird interaction with @patch and its arguments - they are in reversed order, which messes up quite a few things. As a result, we're moving to the standard unittest, which looks similar to nose. Here are the relevant differences: - Writing tests: - Each test needs to be a member function, named `test_whatever()`. - Each test class needs to - Inherit from `unittest.TestCase` - Be called `ThingTest` - Instead of `yield`ing generated tests a `self.subTest()` is called in a loop: https://docs.python.org/3/library/unittest.html#distinguishing-test-iterations-using-subtests - Running tests: - There are far fewer command line options and the biggest problem was `--ignore`. - We have used `--ignore` to omit libclang tests from that one CI run. Now we add a `load_tests()` to `ycmd/tests/clang/__init__.py`. Reference https://docs.python.org/3/library/unittest.html#load-tests-protocol
- Loading branch information
Showing
123 changed files
with
27,006 additions
and
27,633 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
Valgrind bug (https://stackoverflow.com/questions/1542457/memory-leak-reported-by-valgrind-in-dlopen) | ||
Memcheck:Leak | ||
fun:malloc | ||
... | ||
fun:dl_open_worker | ||
fun:_dl_catch_exception | ||
fun:_dl_open | ||
fun:dlopen_doit | ||
fun:_dl_catch_exception | ||
fun:_dl_catch_error | ||
fun:_dlerror_run | ||
fun:dlopen@@GLIBC_2.2.5 | ||
fun:_PyImport_FindSharedFuncptr | ||
fun:_PyImport_LoadDynamicModuleWithSpec | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.