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

okfn / messytables / 461 / 2
84%
master: 84%

Build:
DEFAULT BRANCH: master
Ran 07 Feb 2017 01:48AM UTC
Files 16
Run time 1s
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

07 Feb 2017 01:38AM UTC coverage: 80.982%. Remained the same
461.2

push

travis-ci

rufuspollock
[types,bug][s]: fixes #163 type_guess error "has no len" on DateUtilType.

This is happening when type guessing using the `DataUtilType` (in my case on an xls). It is caused by this code https://github.com/okfn/messytables/blob/master/messytables/types.py#L188

```
    def test(self, value):
        if len(value) == 1:
             return False
        return CellType.test(self, value)
```

The value passed is the value of any cell and may already have been cast e.g. it could be float or a datetime -- neither of which have a len attribute. I suspect in CSV this issue does not show up because everything is a string. However, with xls parsing this can happen as xls already casts cell data.

The solution was based on adapting the test from the DateType above.

I have **not** created a new test case. However, these two tests in dataconverters were exercising the problem and failing. They are now passing:

https://github.com/okfn/dataconverters/blob/<a class=hub.com/okfn/messytables/commit/85cf1a844a4e6b0b7de349a9c61c7c1c322d34e1">85cf1a844/tests/test_xls_json.py#L24
https://github.com/okfn/dataconverters/blob/85cf1a844a4e6b0b7de349a9c61c7c1c322d34e1/tests/test_xls_json.py#L33

907 of 1120 relevant lines covered (80.98%)

0.81 hits per line

Source Files on job 461.2
  • Tree
  • List 0
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 461
  • Travis Job 461.2
  • 15a5bfbe on github
  • Prev Job for on master (#447.2)
  • Next Job for on master (#462.1)
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