1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-24 04:05:39 +01:00

tests: test that progressbar adjusts to term width

Reference: #ep14boat
This commit is contained in:
Olof Johansson 2014-07-24 18:45:46 +02:00
parent 17500539a5
commit a6e030b803

View File

@ -83,6 +83,14 @@ class progressbarTest(unittest.TestCase):
self.mockfile.read(), "\r[020/100][=====....................] msg"
)
def test_progress_20_100_termwidth(self):
svtplay_dl.output.get_terminal_size = lambda: (75, 25)
svtplay_dl.output.progressbar(100, 20)
self.assertEqual(
self.mockfile.read(),
"\r[020/100][==========........................................] "
)
class EtaTest(unittest.TestCase):
@patch('time.time')
def test_eta_0_100(self, mock_time):