Debian Codegraph @

tests/test_coverup_64.py

raw symbols SCIP
1 # file scalene/sparkline.py:64-75
2 # lines [70]
3 # branches ['65->70']
4
5 import pytest
6 from unittest.mock import patch
7
8 # Assuming the _in_wsl and _in_windows_terminal functions are in the same module
9 from scalene.sparkline import _get_bars
10
11
12 @pytest.fixture
13 def cleanup():
14 # Fixture to clean up any state after the test
15 yield
16 # No cleanup actions needed for this test
17
18
19 def test_get_bars_in_wsl_not_in_windows_terminal(cleanup):
20 with patch("scalene.sparkline._in_wsl", return_value=True):
21 with patch("scalene.sparkline._in_windows_terminal", return_value=False):
22 bars = _get_bars()
23 assert bars == chr(0x2584) * 2 + chr(0x25A0) * 3 + chr(0x2580) * 3