MCPcopy
hub / github.com/pterm/pterm / TestProgressbarPrinter_RemoveWhenDone

Function TestProgressbarPrinter_RemoveWhenDone

progressbar_printer_test.go:59–67  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

57}
58
59func TestProgressbarPrinter_RemoveWhenDone(t *testing.T) {
60 proxyToDevNull()
61 p, err := pterm.DefaultProgressbar.WithTotal(2).WithRemoveWhenDone().Start()
62 testza.AssertNoError(t, err)
63 p.Stop()
64 p.Add(1)
65 testza.AssertEqual(t, 1, p.Current)
66 testza.AssertFalse(t, p.IsActive)
67}
68
69func TestProgressbarPrinter_StartWithTitle(t *testing.T) {
70 p := pterm.DefaultProgressbar

Callers

nothing calls this directly

Calls 6

proxyToDevNullFunction · 0.85
WithTotalMethod · 0.80
StartMethod · 0.45
WithRemoveWhenDoneMethod · 0.45
StopMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…