mirror of
https://github.com/rendercv/rendercv.git
synced 2026-04-19 14:34:18 -04:00
* fix render --quiet option issue #608 * format fixed * Improve solution --------- Co-authored-by: Sina Atalay <79940989+sinaatalay@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
18485d7185
commit
cfdaf9cb0f
@@ -51,16 +51,20 @@ class TestProgressPanelFinishProgress:
|
||||
|
||||
|
||||
class TestProgressPanelPrintProgressPanel:
|
||||
def test_quiet_mode_produces_no_output(self, capsys):
|
||||
with ProgressPanel(quiet=True) as panel:
|
||||
panel.update_progress("100", "Test", [])
|
||||
panel.finish_progress()
|
||||
|
||||
captured = capsys.readouterr()
|
||||
assert captured.out == ""
|
||||
|
||||
def test_respects_quiet_mode(self):
|
||||
panel = ProgressPanel(quiet=True)
|
||||
panel.completed_steps.append(CompletedStep("100", "Test", []))
|
||||
|
||||
panel.print_progress_panel("Test Title")
|
||||
|
||||
# In quiet mode, nothing should be printed/updated
|
||||
# We can't easily test the internal state of rich.live.Live, so we just
|
||||
# verify the method doesn't raise an error
|
||||
|
||||
def test_displays_step_without_paths(self):
|
||||
panel = ProgressPanel(quiet=True)
|
||||
panel.completed_steps.append(CompletedStep("100", "Validated input", []))
|
||||
|
||||
Reference in New Issue
Block a user