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

ICRAR / ngas / 342 / 3
69%
master: 69%

Build:
DEFAULT BRANCH: master
Ran 28 Aug 2019 01:43AM UTC
Files 160
Run time 10s
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

28 Aug 2019 01:29AM UTC coverage: 67.103% (-0.002%) from 67.105%
DB=postgresql

push

travis-ci

rtobar
Preventing TypeError during date comparison

The type of lastSchedule up to this point is either NoneType or str,
but on the other hand lastDelivery is a float (the type we use
internally to hold date/times). These two values are compared for order,
and while python2 happily compares strings v/s floats, python3 refuses
to do so and bombs out with a TypeError.

Because the subscription code is so convolved, it's a bit difficult to
fix this at the very source of the problem, but ensuring the correct
data representation just before the comparison is sufficient.

This problem was obviously not caught by our unit test suite because the
conditions to trigger it were not coded into any of them. I'm thus
adding a new unit test that reproduces the original problem, and that
will ensure this doesn't happen again.

This patch solves #4.

Signed-off-by: Rodrigo Tobar <rtobar@icrar.org>

12869 of 19178 relevant lines covered (67.1%)

0.67 hits per line

Source Files on job 342.3 (DB=postgresql)
  • Tree
  • List 0
  • Changed 7
  • Source Changed 1
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 301
  • Travis Job 342.3
  • 8b823408 on github
  • Prev Job for DB=postgresql on master (#341.3)
  • Next Job for DB=postgresql on master (#345.3)
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