Skip to content

Commit

Permalink
Adapt test to change in pint 0.18
Browse files Browse the repository at this point in the history
pint 0.18 introduced a change that breaks some of our unit tests.
See: hgrecco/pint#1407
Adapt the tests to work both with pint <=0.18
  • Loading branch information
Carlos Pascual committed Nov 4, 2021
1 parent a25da28 commit f8d6c76
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/taurus/qt/qtgui/display/test/test_tauruslabel.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def _typeFormatter(dtype, **kwargs):
@pytest.mark.parametrize(
"model, fmt, fg",
[
("eval:1.2345", "{:.3f}", "1.234 dimensionless"),
("eval:1.2345", "{:.3fP}", "1.234 dimensionless"),
("eval:1.2345", "{:~.3f}", "1.234"),
("eval:1.2345", "{:~.3f}", "1.234"),
("eval:1.2345", ">>{}<<", ">>1.2345<<"),
Expand Down Expand Up @@ -206,7 +206,7 @@ def test_instance_format(
@pytest.mark.parametrize(
"model, fmt, fg",
[
("eval:1.2345", "{:.3f}", "1.234 dimensionless"),
("eval:1.2345", "{:.3fP}", "1.234 dimensionless"),
("eval:1.2345", "{:~.3f}", "1.234"),
("eval:1.2345", "{:~.3f}", "1.234"),
("eval:1.2345", ">>{}<<", ">>1.2345<<"),
Expand All @@ -228,7 +228,7 @@ def test_class_format(monkeypatch, qtbot, caplog, model, fmt, fg):
qtbot.addWidget(w)

w.setModel(model)
w.resetFormat() # needed to avoid fuzzyness in the tests
w.resetFormat() # needed to avoid fuzziness in the tests

def _ok():
"""Check text"""
Expand Down

0 comments on commit f8d6c76

Please sign in to comment.