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

hgrecco / pint / 1555
92%
master: 91%

Build:
Build:
LAST BUILD BRANCH: fix-nonmult-doc
DEFAULT BRANCH: master
Ran 16 Jan 2020 05:58AM UTC
Jobs 16
Files 18
Run time 6min
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

pending completion
1555

push

travis-ci

web-flow
Merge #989

989: Allow constants in units by using leading underscore r=hgrecco a=jni

See #507 for discussion.

This change allows code like the following:

```python
In [1]: from pint import UnitRegistry                                              
In [2]: u = UnitRegistry()                                                         
In [3]: u.define('_100km = 100 * kilometer')                                       
In [4]: u.define('mpg = 1 * mile / gallon')                                        
In [5]: volt_petrol_ec = 5 * u.L / u._100km                                        
In [6]: (1 / volt_petrol_ec).to(u.mpg)                                             
Out[6]: 47.042916666666656 <Unit('mpg')>
```

- [x] Closes #507
- [x] Executed ``black -t py36 . && isort -rc . && flake8`` with no errors
- [x] The change is fully covered by automated unit tests
- [x] Documented in docs/ as appropriate
- [x] Added an entry to the CHANGES file


Co-authored-by: Juan Nunez-Iglesias <juan.nunez-iglesias@monash.edu>

3493 of 3852 relevant lines covered (90.68%)

11.92 hits per line

Jobs
ID Job ID Ran Files Coverage
1 1555.1 (PKGS="python=3.7 flake8 black isort") 16 Jan 2020 05:58AM UTC 0
Travis Job 1555.1
2 1555.2 (PKGS="python=3.7 ipython matplotlib nbsphinx numpy sphinx Pygments==2.3.1 docutils==0.14 alabaster commonmark==0.8.1 recommonmark==0.5.0") 16 Jan 2020 06:00AM UTC 0
Travis Job 1555.2
3 1555.3 (PKGS="python=3.6") 16 Jan 2020 05:59AM UTC 0
75.71
Travis Job 1555.3
4 1555.4 (PKGS="python=3.7") 16 Jan 2020 05:59AM UTC 0
75.71
Travis Job 1555.4
5 1555.5 (PKGS="python=3.8") 16 Jan 2020 05:59AM UTC 0
76.1
Travis Job 1555.5
6 1555.6 (PKGS="python=3.6 uncertainties=3.0") 16 Jan 2020 06:00AM UTC 0
89.05
Travis Job 1555.6
7 1555.7 (PKGS="python=3.7 uncertainties=3.0") 16 Jan 2020 06:01AM UTC 0
88.97
Travis Job 1555.7
8 1555.8 (PKGS="python=3.6 numpy=1.14 matplotlib") 16 Jan 2020 06:01AM UTC 0
85.49
Travis Job 1555.8
9 1555.9 (PKGS="python=3.7 numpy=1.14 matplotlib") 16 Jan 2020 06:01AM UTC 0
85.49
Travis Job 1555.9
10 1555.10 (PKGS="python=3.8 numpy=1.17 matplotlib") 16 Jan 2020 06:02AM UTC 0
88.3
Travis Job 1555.10
11 1555.11 (PKGS="python=3.6 numpy=1.14 uncertainties=3.0") 16 Jan 2020 06:03AM UTC 0
86.63
Travis Job 1555.11
12 1555.12 (PKGS="python=3.7 numpy=1.14 uncertainties=3.0") 16 Jan 2020 06:03AM UTC 0
86.63
Travis Job 1555.12
13 1555.13 (PKGS="python=3.6 numpy uncertainties") 16 Jan 2020 06:03AM UTC 0
89.05
Travis Job 1555.13
14 1555.14 (PKGS="python=3.7 numpy uncertainties") 16 Jan 2020 06:03AM UTC 0
89.05
Travis Job 1555.14
15 1555.15 (PKGS="python=3.8 numpy uncertainties") 16 Jan 2020 06:04AM UTC 0
89.17
Travis Job 1555.15
16 1555.16 (PKGS="python xarray netCDF4") 16 Jan 2020 06:05AM UTC 0
87.62
Travis Job 1555.16
Source Files on build 1555
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1555
  • 59d9d86f on github
  • Prev Build on staging (#1550)
  • Next Build on staging (#1572)
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