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

hgrecco / pint / 1400
91%

Build:
DEFAULT BRANCH: master
Ran 18 Dec 2019 09:08PM UTC
Jobs 14
Files 136
Run time 5min
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
1400

push

travis-ci

web-flow
Merge #933

933: Pretty print - once more, this time with feeling r=hgrecco a=crusaderky

I found out how those ``<sup>`` tags worked before I removed them in #928.

My previous PR fixed units with underscores when you have a numpy magnitude *and broke them when you don't*. It *also* broke exponential representation. :tired_face:

New manual test:
```python
import pint
from IPython.display import display_html, display_latex

for f in ("{!s}", "{!r}", "{:P}", display_html, display_latex):
    print('-------------')
    print(f.__name__ if callable(f) else f)
    print('-------------')
    if isinstance(f, str):
        s = f
        f = lambda x: print(s.format(x))

    f(pint.Unit("kg * m^2 / s"))
    f(pint.Quantity(1, "kg * m^2 / s"))
    f(pint.Quantity([1, 2], "kg * m^2 / s"))
    f(pint.Quantity(1, "kg * m^2 / s").plus_minus(1))
    f(pint.Quantity([1, 2], "kg * m^2 / s"))
    f(pint.Unit("oil_barrel"))
    f(pint.Quantity(1, "oil_barrel"))
    f(pint.Quantity(1, "oil_barrel").plus_minus(1))
    f(pint.Quantity([1, 2], "oil_barrel"))
    f(pint.Quantity(3e20, "m"))
    f(pint.Quantity(3e-20, "m"))
    f(pint.Quantity(3e20, "m").plus_minus(1e19))
    f(pint.Quantity(3e-20, "m").plus_minus(1e-21))
```

Output:
Before #928: https://www.dropbox.com/s/tr4dplosrhzfn40/Before_928.html?dl=0
After this PR: https://www.dropbox.com/s/nfjzy45vhkne7jn/After_933.html?dl=0

**Note:** github has trouble rendering the HTML version. My first attempt was to upload the notebook to gist, but it didn't go well for this reason. You'll need to click "direct download" in the links above. Sorry for the inconvenience.

Co-authored-by: Guido Imperiale <crusaderky@gmail.com>

24588 of 28560 relevant lines covered (86.09%)

11.06 hits per line

Jobs
ID Job ID Ran Files Coverage
1 1400.1 (PKGS="python=3.7 flake8 black isort") 18 Dec 2019 09:08PM UTC 0
Travis Job 1400.1
2 1400.2 (PKGS="python=3.6") 18 Dec 2019 09:09PM UTC 0
76.14
Travis Job 1400.2
3 1400.3 (PKGS="python=3.7") 18 Dec 2019 09:09PM UTC 0
76.14
Travis Job 1400.3
4 1400.4 (PKGS="python=3.8") 18 Dec 2019 09:09PM UTC 0
76.44
Travis Job 1400.4
5 1400.5 (PKGS="python=3.6 uncertainties=3.0") 18 Dec 2019 09:10PM UTC 0
89.22
Travis Job 1400.5
6 1400.6 (PKGS="python=3.7 uncertainties=3.0") 18 Dec 2019 09:11PM UTC 0
89.22
Travis Job 1400.6
7 1400.7 (PKGS="python=3.6 numpy=1.14") 18 Dec 2019 09:11PM UTC 0
85.07
Travis Job 1400.7
8 1400.8 (PKGS="python=3.7 numpy=1.14") 18 Dec 2019 09:11PM UTC 0
85.16
Travis Job 1400.8
9 1400.9 (PKGS="python=3.8 numpy=1.17") 18 Dec 2019 09:11PM UTC 0
87.48
Travis Job 1400.9
10 1400.10 (PKGS="python=3.6 numpy=1.14 uncertainties=3.0") 18 Dec 2019 09:12PM UTC 0
87.12
Travis Job 1400.10
11 1400.11 (PKGS="python=3.7 numpy=1.14 uncertainties=3.0") 18 Dec 2019 09:13PM UTC 0
87.12
Travis Job 1400.11
12 1400.12 (PKGS="python=3.6 numpy uncertainties") 18 Dec 2019 09:13PM UTC 0
89.22
Travis Job 1400.12
13 1400.13 (PKGS="python=3.7 numpy uncertainties") 18 Dec 2019 09:13PM UTC 0
89.22
Travis Job 1400.13
14 1400.14 (PKGS="python=3.8 numpy uncertainties") 18 Dec 2019 09:13PM UTC 0
89.4
Travis Job 1400.14
Source Files on build 1400
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1400
  • 4c3114c7 on github
  • Prev Build on master (#1393)
  • Next Build on master (#1406)
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