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

hgrecco / pint / 1706 / 15
91%
master: 91%

Build:
DEFAULT BRANCH: master
Ran 02 Apr 2020 05:32AM UTC
Files 18
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

02 Apr 2020 05:09AM UTC coverage: 88.484%. Remained the same
PKGS="python=3.8 numpy uncertainties"

push

travis-ci

web-flow
Merge #1041

1041: Return expected empty type for parse_pattern function r=hgrecco a=abmyii

N.B. Pardon me if I didn't follow convention by opening an issue before making this PR.

Whilst using the `parse_pattern` function with `pandas` I realised the `return self.Quantity(1)` returned a dimensionless quantity which would be out of place compared to all of the other returned values causing parsing issues. The error I was getting was:
```
  File "/usr/lib/python3.6/site-packages/pandas/core/frame.py", line 1598, in from_records
    arrays, arr_columns = to_arrays(data, columns, coerce_float=coerce_float)
  File "/usr/lib/python3.6/site-packages/pandas/core/internals/construction.py", line 464, in to_arrays
    return _list_to_arrays(data, columns, coerce_float=coerce_float, dtype=dtype)
  File "/usr/lib/python3.6/site-packages/pandas/core/internals/construction.py", line 496, in _list_to_arrays
    content = list(lib.to_object_array(data).T)
  File "pandas/_libs/lib.pyx", line 2275, in pandas._libs.lib.to_object_array
  File "/usr/lib/python3.6/site-packages/pint/quantity.py", line 1693, in __len__
    return len(self._magnitude)
TypeError: object of type 'int' has no len()
```

This simple fix returns a value which conforms with the expected output type.

Co-authored-by: Abdurrahmaan Iqbal <abdurrahmaaniqbal@hotmail.com>

3596 of 4064 relevant lines covered (88.48%)

0.88 hits per line

Source Files on job 1706.15 (PKGS="python=3.8 numpy uncertainties")
  • Tree
  • List 0
  • Changed 1
  • Source Changed 1
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 1586
  • Travis Job 1706.15
  • 4a8ca9c0 on github
  • Prev Job for PKGS="python=3.8 numpy uncertainties" on master (#1704.15)
  • Next Job for PKGS="python=3.8 numpy uncertainties" on master (#1714.15)
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