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

okfn / messytables / 461
84%

Build:
DEFAULT BRANCH: master
Ran 07 Feb 2017 01:48AM UTC
Jobs 3
Files 16
Run time 9min
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
461

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

939 of 1120 relevant lines covered (83.84%)

2.45 hits per line

Jobs
ID Job ID Ran Files Coverage
1 461.1 07 Feb 2017 01:58AM UTC 0
82.95
Travis Job 461.1
2 461.2 07 Feb 2017 01:48AM UTC 0
80.98
Travis Job 461.2
3 461.3 07 Feb 2017 01:48AM UTC 0
80.89
Travis Job 461.3
Source Files on build 461
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #461
  • 15a5bfbe on github
  • Prev Build on master (#447)
  • Next Build on master (#462)
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

© 2025 Coveralls, Inc