Skip to content

Commit

Permalink
Fix legacy support.
Browse files Browse the repository at this point in the history
  • Loading branch information
riga committed Mar 30, 2023
1 parent 6d00d08 commit 0e1c784
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_number.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,14 +375,14 @@ def test_combine_uncertaintes(self):
n2 = n.combine_uncertaintes({"x": ["stat", "syst"]})
self.assertEqual(n2.str(format=3), "8848.0 +36.1-28.3 (x) +- 10.0 (other)")

n3 = n.combine_uncertaintes({"x": ["stat", "syst"], "y": "all"})
n3 = n.combine_uncertaintes(OrderedDict([("x", ["stat", "syst"]), ("y", "all")]))
self.assertEqual(n3.str(format=3), "8848.0 +36.1-28.3 (x) +37.4-30.0 (y)")

def test_uncertainty_format(self):
n = Number(8848, {"stat": (30, 20), "syst": 20, "other": 10})

self.assertEqual(
n.str(format=3, combine_uncs={"x": ["stat", "syst"], "y": "all"}),
n.str(format=3, combine_uncs=OrderedDict([("x", ["stat", "syst"]), ("y", "all")])),
"8848.0 +36.1-28.3 (x) +37.4-30.0 (y)",
)

Expand Down

0 comments on commit 0e1c784

Please sign in to comment.