MCPcopy Create free account
hub / github.com/NSLS2/PyXRF / test_TerminalProgressBar

Function test_TerminalProgressBar

pyxrf/core/tests/test_map_processing.py:67–77  ·  view source on GitHub ↗

Basic functionality of `TerminalProgressBar`

()

Source from the content-addressed store, hash-verified

65
66
67def test_TerminalProgressBar():
68 """Basic functionality of `TerminalProgressBar`"""
69
70 # We just run the sequence of instructions. I didn't find a way to check the output,
71 # since 'progress' package requires TTY terminal. Otherwise output is blocked
72 title = "Monitor progress"
73 pbar = TerminalProgressBar(title)
74 pbar.start()
75 for n in range(10):
76 pbar(n * 10) # Go from 0 to 90%
77 pbar.finish() # This should set it to 100%
78
79
80class _SampleProgressBar:

Callers

nothing calls this directly

Calls 3

startMethod · 0.95
finishMethod · 0.95
TerminalProgressBarClass · 0.90

Tested by

no test coverage detected