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

hgrecco / pint / 801 / 11
91%
master: 91%

Build:
DEFAULT BRANCH: master
Ran 04 May 2018 02:52AM UTC
Files 16
Run time 0s
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

04 May 2018 02:33AM UTC coverage: 88.118% (+0.04%) from 88.081%
UNCERTAINTIES="Y" PYTHON="3.5" NUMPY_VERSION=1.14

push

travis-ci

bors[bot]
Merge #637

637: Add Unit.from_ and Unit.m_from r=hgrecco a=virtuald

Converts from a number or quantity to the unit (or the magnitude). This is most useful for when you aren't sure if the input is a Quantity.

While you could technically use `ureg.check()` for this, it's syntactically cleaner (and I suspect more performant) to use this:

```
ureg.inch.from_(1*foot)
ureg.inch.from_(1, strict=False)
```

Added tests and docstrings. I'm not quite sure where in the docs this should go, but I'm willing to add a blurb in there if you'll point me to the right place.

Co-authored-by: Dustin Spicuzza <dustin@virtualroadside.com>

2833 of 3215 relevant lines covered (88.12%)

0.88 hits per line

Source Files on job 801.11 (UNCERTAINTIES="Y" PYTHON="3.5" NUMPY_VERSION=1.14)
  • Tree
  • List 0
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 779
  • Travis Job 801.11
  • 0c4a9503 on github
  • Prev Job for UNCERTAINTIES="Y" PYTHON="3.5" NUMPY_VERSION=1.14 on master (#799.11)
  • Next Job for UNCERTAINTIES="Y" PYTHON="3.5" NUMPY_VERSION=1.14 on master (#812.11)
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