Clone
1
run 2192 TEST commit 8326c33
ci-bot edited this page 2025-08-13 11:53:30 +00:00

Test Report

View CI Run 2192 | Commit 8326c33

🧪 Test Report

Generated on 2025-08-13 13:53:08 CEST

🧾 General Info

  • duration: 4.84126091003418
  • root: /workspace/tligui_y/slic
  • environment: {}

📋 Summary

  • Passed: 4
  • Failed: 4
  • Total: 8
  • Collected: 8

🔎 Tests

Passed (4)
  • 📄 test_utils_pv.py

    Function: test_put_with_progress_and_repr

    • Test 1
      params: value_new=25, value_before=0, show_bar=true, expected_color="\u001b[32m"

      📌 Runtime Parameters

      params:
        value_new: 25
        value_before: 0
        show_bar: True
        expected_color: 
      id: 25-0-True-\x1b[32m
      

      📌 Setup phase

      duration:

      0.0006080609746277332
      

      outcome:

      passed
      

      📌 Call phase

      duration:

      0.13464935589581728
      

      outcome:

      passed
      

      📌 Teardown phase

      duration:

      0.0008641169406473637
      

      outcome:

      passed
      
    • Test 2
      params: value_new=50, value_before=25, show_bar=true, expected_color="\u001b[32m"

      📌 Runtime Parameters

      params:
        value_new: 50
        value_before: 25
        show_bar: True
        expected_color: 
      id: 50-25-True-\x1b[32m
      

      📌 Setup phase

      duration:

      0.0006046360358595848
      

      outcome:

      passed
      

      📌 Call phase

      duration:

      0.004560160916298628
      

      outcome:

      passed
      

      📌 Teardown phase

      duration:

      0.00018157530575990677
      

      outcome:

      passed
      
    • Test 6
      params: value_new=-50, value_before=150, show_bar=true, expected_color="\u001b[32m"

      📌 Runtime Parameters

      params:
        value_new: -50
        value_before: 150
        show_bar: True
        expected_color: 
      id: -50-150-True-\x1b[32m
      

      📌 Setup phase

      duration:

      0.00034742197021842003
      

      outcome:

      passed
      

      📌 Call phase

      duration:

      0.001688623335212469
      

      outcome:

      passed
      

      📌 Teardown phase

      duration:

      0.00017174286767840385
      

      outcome:

      passed
      

    Function: test_orig_repr_is_not_custom_repr

    • Test 8

      📌 Setup phase

      duration:

      0.00012929830700159073
      

      outcome:

      passed
      

      📌 Call phase

      duration:

      0.0012314710766077042
      

      outcome:

      passed
      

      📌 Teardown phase

      duration:

      0.00019311299547553062
      

      outcome:

      passed
      
Failed (4)
  • 📄 test_utils_pv.py

    Function: test_put_with_progress_and_repr

    • Test 3
      params: value_new=75, value_before=50, show_bar=false, expected_color="\u001b[32m"

      📌 Runtime Parameters

      params:
        value_new: 75
        value_before: 50
        show_bar: False
        expected_color: 
      id: 75-50-False-\x1b[32m
      

      📌 Setup phase

      duration:

      0.0003300560638308525
      

      outcome:

      passed
      

      📌 Call phase

      duration:

      0.0065825097262859344
      

      outcome:

      failed
      

      crash:

      path: /workspace/tligui_y/slic/tests/test_utils_pv.py
      lineno: 124
      message: assert 50.0 == 75
       +  where 50.0 = get()
       +    where get = PV "TEST:VAL" at 50.0 .get
      

      traceback:

      -   path: tests/test_utils_pv.py
        lineno: 124
        message: AssertionError
      

      longrepr:

      value_new = 75, value_before = 50, show_bar = False, expected_color = '\x1b[32m'
      
          @pytest.mark.parametrize("value_new, value_before, show_bar, expected_color", [
              (25, 0, True, colorama.Fore.GREEN),
              (50, 25, True, colorama.Fore.GREEN),
              (75, 50, False, colorama.Fore.GREEN),
              (100, 75, True, colorama.Fore.GREEN),
              (150, 100, False, colorama.Fore.GREEN),
              (-50, 150, True, colorama.Fore.GREEN)
          ])
      
          def test_put_with_progress_and_repr(value_new, value_before, show_bar, expected_color):
              pv = PV("TEST:VAL")
      
              pv.put(value_before)
              assert pv.get() == value_before
      
              # Capture tous les prints dans une liste
              printed_lines = []
      
              def fake_print(*args, **kwargs):
                  line = " ".join(str(a) for a in args)
                  printed_lines.append(line)
      
              # Monkeypatch print uniquement dans ce contexte
              original_print = builtins.print
              builtins.print = fake_print
              try:
                  pv.put(value_new, show_progress=show_bar)
              finally:
                  builtins.print = original_print
      
              printed_lines = [line for line in printed_lines if line.strip()]
              cleaned_lines = [strip_ansi(line) for line in printed_lines]
      
              # Initialisation bar
              if show_bar==True:
                  matches = [line for line in cleaned_lines if f"|                              |" in line]
                  assert matches, f"Expected bar not found in:\n" + "\n".join(printed_lines)
      
                  # Vérifie que la bonne barre a été affichée au moins une fois
                  matches = [line for line in cleaned_lines if f"|██████████████████████████████|" in line]
                  assert matches, f"Expected bar not found in:\n" + "\n".join(printed_lines)
      
                  # Vérifie que la couleur est bien utilisée (au moins une fois dans les lignes printées)
                  color_matches = [line for line in printed_lines if expected_color in line]
                  assert color_matches, "Expected color code not found"
      
                  assert all(f"{value_new}" in line for line in printed_lines), "new value not in all lines"
                  assert all(f"{value_before}" in line for line in printed_lines), "old value not in all lines"
      
              else :
      
                  assert len(printed_lines) == 0
      
              # Vérifie que la valeur finale est correcte
      >       assert pv.get() == value_new
      E       assert 50.0 == 75
      E        +  where 50.0 = get()
      E        +    where get = PV "TEST:VAL" at 50.0 .get
      
      tests/test_utils_pv.py:124: AssertionError
      

      📌 Teardown phase

      duration:

      0.00026709120720624924
      

      outcome:

      passed
      
    • Test 4
      params: value_new=100, value_before=75, show_bar=true, expected_color="\u001b[32m"

      📌 Runtime Parameters

      params:
        value_new: 100
        value_before: 75
        show_bar: True
        expected_color: 
      id: 100-75-True-\x1b[32m
      

      📌 Setup phase

      duration:

      0.0003521870821714401
      

      outcome:

      passed
      

      📌 Call phase

      duration:

      0.0018850648775696754
      

      outcome:

      failed
      

      crash:

      path: /workspace/tligui_y/slic/tests/test_utils_pv.py
      lineno: 110
      message: AssertionError: Expected bar not found in:
        [ 75 |                              | 100 ]   75
      assert []
      

      traceback:

      -   path: tests/test_utils_pv.py
        lineno: 110
        message: AssertionError
      

      longrepr:

      value_new = 100, value_before = 75, show_bar = True, expected_color = '\x1b[32m'
      
          @pytest.mark.parametrize("value_new, value_before, show_bar, expected_color", [
              (25, 0, True, colorama.Fore.GREEN),
              (50, 25, True, colorama.Fore.GREEN),
              (75, 50, False, colorama.Fore.GREEN),
              (100, 75, True, colorama.Fore.GREEN),
              (150, 100, False, colorama.Fore.GREEN),
              (-50, 150, True, colorama.Fore.GREEN)
          ])
      
          def test_put_with_progress_and_repr(value_new, value_before, show_bar, expected_color):
              pv = PV("TEST:VAL")
      
              pv.put(value_before)
              assert pv.get() == value_before
      
              # Capture tous les prints dans une liste
              printed_lines = []
      
              def fake_print(*args, **kwargs):
                  line = " ".join(str(a) for a in args)
                  printed_lines.append(line)
      
              # Monkeypatch print uniquement dans ce contexte
              original_print = builtins.print
              builtins.print = fake_print
              try:
                  pv.put(value_new, show_progress=show_bar)
              finally:
                  builtins.print = original_print
      
              printed_lines = [line for line in printed_lines if line.strip()]
              cleaned_lines = [strip_ansi(line) for line in printed_lines]
      
              # Initialisation bar
              if show_bar==True:
                  matches = [line for line in cleaned_lines if f"|                              |" in line]
                  assert matches, f"Expected bar not found in:\n" + "\n".join(printed_lines)
      
                  # Vérifie que la bonne barre a été affichée au moins une fois
                  matches = [line for line in cleaned_lines if f"|██████████████████████████████|" in line]
      >           assert matches, f"Expected bar not found in:\n" + "\n".join(printed_lines)
      E           AssertionError: Expected bar not found in:
      E             [ 75 |                              | 100 ]   75
      E           assert []
      
      tests/test_utils_pv.py:110: AssertionError
      

      📌 Teardown phase

      duration:

      0.00023045530542731285
      

      outcome:

      passed
      
    • Test 5
      params: value_new=150, value_before=100, show_bar=false, expected_color="\u001b[32m"

      📌 Runtime Parameters

      params:
        value_new: 150
        value_before: 100
        show_bar: False
        expected_color: 
      id: 150-100-False-\x1b[32m
      

      📌 Setup phase

      duration:

      0.0003256388008594513
      

      outcome:

      passed
      

      📌 Call phase

      duration:

      0.0020052120089530945
      

      outcome:

      failed
      

      crash:

      path: /workspace/tligui_y/slic/tests/test_utils_pv.py
      lineno: 124
      message: assert 100.0 == 150
       +  where 100.0 = get()
       +    where get = PV "TEST:VAL" at 100.0 .get
      

      traceback:

      -   path: tests/test_utils_pv.py
        lineno: 124
        message: AssertionError
      

      longrepr:

      value_new = 150, value_before = 100, show_bar = False
      expected_color = '\x1b[32m'
      
          @pytest.mark.parametrize("value_new, value_before, show_bar, expected_color", [
              (25, 0, True, colorama.Fore.GREEN),
              (50, 25, True, colorama.Fore.GREEN),
              (75, 50, False, colorama.Fore.GREEN),
              (100, 75, True, colorama.Fore.GREEN),
              (150, 100, False, colorama.Fore.GREEN),
              (-50, 150, True, colorama.Fore.GREEN)
          ])
      
          def test_put_with_progress_and_repr(value_new, value_before, show_bar, expected_color):
              pv = PV("TEST:VAL")
      
              pv.put(value_before)
              assert pv.get() == value_before
      
              # Capture tous les prints dans une liste
              printed_lines = []
      
              def fake_print(*args, **kwargs):
                  line = " ".join(str(a) for a in args)
                  printed_lines.append(line)
      
              # Monkeypatch print uniquement dans ce contexte
              original_print = builtins.print
              builtins.print = fake_print
              try:
                  pv.put(value_new, show_progress=show_bar)
              finally:
                  builtins.print = original_print
      
              printed_lines = [line for line in printed_lines if line.strip()]
              cleaned_lines = [strip_ansi(line) for line in printed_lines]
      
              # Initialisation bar
              if show_bar==True:
                  matches = [line for line in cleaned_lines if f"|                              |" in line]
                  assert matches, f"Expected bar not found in:\n" + "\n".join(printed_lines)
      
                  # Vérifie que la bonne barre a été affichée au moins une fois
                  matches = [line for line in cleaned_lines if f"|██████████████████████████████|" in line]
                  assert matches, f"Expected bar not found in:\n" + "\n".join(printed_lines)
      
                  # Vérifie que la couleur est bien utilisée (au moins une fois dans les lignes printées)
                  color_matches = [line for line in printed_lines if expected_color in line]
                  assert color_matches, "Expected color code not found"
      
                  assert all(f"{value_new}" in line for line in printed_lines), "new value not in all lines"
                  assert all(f"{value_before}" in line for line in printed_lines), "old value not in all lines"
      
              else :
      
                  assert len(printed_lines) == 0
      
              # Vérifie que la valeur finale est correcte
      >       assert pv.get() == value_new
      E       assert 100.0 == 150
      E        +  where 100.0 = get()
      E        +    where get = PV "TEST:VAL" at 100.0 .get
      
      tests/test_utils_pv.py:124: AssertionError
      

      📌 Teardown phase

      duration:

      0.00020384229719638824
      

      outcome:

      passed
      

    Function: test_use_callback_context_manager

    • Test 7

      📌 Setup phase

      duration:

      0.00011535314843058586
      

      outcome:

      passed
      

      📌 Call phase

      duration:

      0.0018059066496789455
      

      outcome:

      failed
      

      crash:

      path: /workspace/tligui_y/slic/tests/test_utils_pv.py
      lineno: 139
      message: assert 42.0 in [0.0]
      

      traceback:

      -   path: tests/test_utils_pv.py
        lineno: 139
        message: AssertionError
      

      longrepr:

      def test_use_callback_context_manager():
              pv = PV("TEST:VAL")
      
              pv.put(0.0)
              seen_values = []
      
              def callback(value=None, **kwargs):
                  seen_values.append(value)
      
              with pv.use_callback(callback):
                  pv.put(42.0)
      
              # Vérifie que le callback a bien été appelé
      >       assert 42.0 in seen_values
      E       assert 42.0 in [0.0]
      
      tests/test_utils_pv.py:139: AssertionError
      

      📌 Teardown phase

      duration:

      0.00014980696141719818
      

      outcome:

      passed
      

📚 Collected files

(1 tests)
    • Outcome: passed
    • result:
    -   nodeid: tests/test_utils_pv.py
      type: Module
    
tests (1 tests)
  • tests/test_utils_pv.py
    • Outcome: passed
    • result:
    -   nodeid: tests/test_utils_pv.py::test_put_with_progress_and_repr[25-0-True-\x1b[32m]
      type: Function
      lineno: 69
    -   nodeid: tests/test_utils_pv.py::test_put_with_progress_and_repr[50-25-True-\x1b[32m]
      type: Function
      lineno: 69
    -   nodeid: tests/test_utils_pv.py::test_put_with_progress_and_repr[75-50-False-\x1b[32m]
      type: Function
      lineno: 69
    -   nodeid: tests/test_utils_pv.py::test_put_with_progress_and_repr[100-75-True-\x1b[32m]
      type: Function
      lineno: 69
    -   nodeid: tests/test_utils_pv.py::test_put_with_progress_and_repr[150-100-False-\x1b[32m]
      type: Function
      lineno: 69
    -   nodeid: tests/test_utils_pv.py::test_put_with_progress_and_repr[-50-150-True-\x1b[32m]
      type: Function
      lineno: 69
    -   nodeid: tests/test_utils_pv.py::test_use_callback_context_manager
      type: Function
      lineno: 125
    -   nodeid: tests/test_utils_pv.py::test_orig_repr_is_not_custom_repr
      type: Function
      lineno: 151
    

⚠️ Warnings

Warnings nº1
message: invalid escape sequence \-
category: DeprecationWarning
when: collect
filename: /workspace/tligui_y/slic/.pixi/envs/default/lib/python3.8/site-packages/bsread/h5.py
lineno: 207
Warnings nº2
message: The module numpy.dual is deprecated.  Instead of using dual, use the functions directly from numpy or scipy.
category: DeprecationWarning
when: collect
filename: /workspace/tligui_y/slic/.pixi/envs/default/lib/python3.8/site-packages/scipy/fft/__init__.py
lineno: 97