Ran
|
Jobs
3
|
Files
16
|
Run time
9min
|
Badge
Embed ▾
README BADGES
|
push
travis-ci
[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
ID | Job ID | Ran | Files | Coverage | |
---|---|---|---|---|---|
1 | 461.1 | 16 |
82.95 |
Travis Job 461.1 | |
2 | 461.2 | 16 |
80.98 |
Travis Job 461.2 | |
3 | 461.3 | 16 |
80.89 |
Travis Job 461.3 |
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|