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

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

Build:
DEFAULT BRANCH: master
Ran 04 May 2018 02:46AM 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: 86.159% (-0.05%) from 86.209%
UNCERTAINTIES="N" PYTHON="3.6" NUMPY_VERSION=1.11.2

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>

2770 of 3215 relevant lines covered (86.16%)

0.86 hits per line

Source Files on job 801.5 (UNCERTAINTIES="N" PYTHON="3.6" NUMPY_VERSION=1.11.2)
  • Tree
  • List 0
  • Changed 2
  • Source Changed 1
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 779
  • Travis Job 801.5
  • 0c4a9503 on github
  • Prev Job for UNCERTAINTIES="N" PYTHON="3.6" NUMPY_VERSION=1.11.2 on master (#799.5)
  • Next Job for UNCERTAINTIES="N" PYTHON="3.6" NUMPY_VERSION=1.11.2 on master (#812.5)
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