Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions tests/test_uncertainties.py
Original file line number Diff line number Diff line change
Expand Up @@ -1272,10 +1272,10 @@ def test_format():
(1234.56789, 0.1): {
'eL': r'\left(1.23457 \pm 0.00010\right) \times 10^{3}',
'EL': r'\left(1.23457 \pm 0.00010\right) \times 10^{3}',
'fL': '1234.57 \pm 0.10',
'FL': '1234.57 \pm 0.10',
'fL': '1234.57 \pm 0.10',
'FL': '1234.57 \pm 0.10',
'fL': r'1234.57 \pm 0.10',
'FL': r'1234.57 \pm 0.10',
'fL': r'1234.57 \pm 0.10',
'FL': r'1234.57 \pm 0.10',
'%L': r'\left(123457 \pm 10\right) \%'
},
#
Expand Down Expand Up @@ -1315,7 +1315,7 @@ def test_format():
'15GS': ' -1.2(%s)E-12' % NaN_EFG,
'SL': r'-1.2(\mathrm{nan}) \times 10^{-12}', # LaTeX NaN
# Pretty-print priority, but not for NaN:
'PSL': u'-1.2(\mathrm{nan})×10⁻¹²',
'PSL': r'-1.2(\mathrm{nan})×10⁻¹²',
'L': r'\left(-1.2 \pm \mathrm{nan}\right) \times 10^{-12}',
# Uppercase NaN and LaTeX:
'.1EL': (r'\left(-1.2 \pm \mathrm{%s}\right) \times 10^{-12}'
Expand Down Expand Up @@ -1394,8 +1394,8 @@ def test_format():
# Default precision = 6
'eL': r'\left(1.234568 \pm 0\right) \times 10^{3}',
'EL': r'\left(1.234568 \pm 0\right) \times 10^{3}',
'fL': '1234.567890 \pm 0',
'FL': '1234.567890 \pm 0',
'fL': r'1234.567890 \pm 0',
'FL': r'1234.567890 \pm 0',
'%L': r'\left(123456.789000 \pm 0\right) \%'
},

Expand Down Expand Up @@ -1560,9 +1560,9 @@ def test_format():
# options:
(float('-inf'), float('inf')): {
'S': '-inf(inf)',
'LS': '-\infty(\infty)',
'L': '-\infty \pm \infty',
'LP': u'-\infty±\infty',
'LS': r'-\infty(\infty)',
'L': r'-\infty \pm \infty',
'LP': r'-\infty±\infty',
# The following is consistent with Python's own
# formatting, which depends on the version of Python:
# formatting float("-inf") with format(..., "020") gives
Expand All @@ -1586,9 +1586,9 @@ def test_format():
},
(-float('nan'), float('inf')): {
'S': 'nan(inf)',
'LS': '\mathrm{nan}(\infty)',
'L': '\mathrm{nan} \pm \infty',
'LP': u'\mathrm{nan}±\infty'
'LS': r'\mathrm{nan}(\infty)',
'L': r'\mathrm{nan} \pm \infty',
'LP': r'\mathrm{nan}±\infty'
},

# Leading zeroes in the shorthand notation:
Expand Down