• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

oemof / oemof / 1058
94%

Build:
DEFAULT BRANCH: dev
Ran 13 Nov 2018 09:02PM UTC
Jobs 3
Files 23
Run time 20s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
1058

cron

travis-ci

uvchik
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

Jobs
ID Job ID Ran Files Coverage
1 1058.1 13 Nov 2018 09:02PM UTC 0
86.91
Travis Job 1058.1
2 1058.2 13 Nov 2018 09:02PM UTC 0
86.91
Travis Job 1058.2
3 1058.3 13 Nov 2018 09:02PM UTC 0
86.91
Travis Job 1058.3
Source Files on build 1058
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1058
  • 153fb17b on github
  • Prev Build on dev (#1045)
  • Next Build on dev (#1064)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc