|
Ran
|
Jobs
3
|
Files
23
|
Run time
20s
|
Badge
README BADGES
|
cron
travis-ci
Squelch deprecation warning when testing processing (#529) * Squelch deprecation warning when testing processing * Revert deprecation warning squelching This reverts commit 0deffe1bf. Apparently the code in question was left the way it was on purpose, in order to test that the deprecated way still works AND raises the `DeprecationWarning`. * Catch the `DeprecationWarning` and test it The `catch_warnings` context manager manipulates the global warning filter. Everything run with this context is treated specially. When used with `record=True`, warnings are not printed to stderr and are instead added to a list, which is called `warnings` here. That way one can test how many and which warnings are issued. The warning objects are not added to the list directly, but are instead wrapped in another object. The warning objects can be accessed via the wrapper's `message` attribute. * Improve failure messages * Further improve failure message The first line of a test's docstring has the special meaning of replacing the test's name after the "FAIL: " in the failure heading. Using a short line that reads well in this banner helps figuring out what went wrong. * Compare warning `repr`esentations Comparing their `str`ings leads to more readable messages, but doesn't test all information. Unfortunately the `str`ings don't include the warning's type and testing all available information is more important than readability. * Improve readability of failure messages Instead of using indentation, which isn't really useful with multi line expectations, and noisy "---"s, I opted to just drop the indentation and use gratuitous empty lines. This IMHO improves readability quite a lot and makes it (relatively) easy to spot the differences, even for long string comparisons.
1613 of 1856 relevant lines covered (86.91%)
2.61 hits per line
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 1058.1 | 0 |
86.91 |
Travis Job 1058.1 | |
| 2 | 1058.2 | 0 |
86.91 |
Travis Job 1058.2 | |
| 3 | 1058.3 | 0 |
86.91 |
Travis Job 1058.3 |