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

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

Build:
DEFAULT BRANCH: master
Ran 04 May 2018 02:48AM UTC
Files 16
Run time 7s
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: 77.729% (+0.07%) from 77.66%
UNCERTAINTIES="N" PYTHON="2.7" NUMPY_VERSION=0

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>

2499 of 3215 relevant lines covered (77.73%)

0.78 hits per line

Source Files on job 801.6 (UNCERTAINTIES="N" PYTHON="2.7" NUMPY_VERSION=0)
  • 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.6
  • 0c4a9503 on github
  • Prev Job for UNCERTAINTIES="N" PYTHON="2.7" NUMPY_VERSION=0 on master (#799.6)
  • Next Job for UNCERTAINTIES="N" PYTHON="2.7" NUMPY_VERSION=0 on master (#812.6)
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