From 158e6b529afde1053ae27e92151d4dae68b44faf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Beaupr=C3=A9?= Date: Sun, 18 Oct 2015 21:06:56 -0400 Subject: [PATCH] cosmetic: pep8 and io is actually just out --- borg/testsuite/helpers.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/borg/testsuite/helpers.py b/borg/testsuite/helpers.py index c8f657fb5..1a83491df 100644 --- a/borg/testsuite/helpers.py +++ b/borg/testsuite/helpers.py @@ -413,25 +413,25 @@ def test_stats_basic(stats): assert stats.osize == stats.csize == 20 assert stats.usize == 10 -def tests_stats_progress(stats, columns = 80): +def tests_stats_progress(stats, columns=80): os.environ['COLUMNS'] = str(columns) - io = StringIO() - stats.show_progress(stream=io) + out = StringIO() + stats.show_progress(stream=out) s = '10 B O 10 B C 10 B D 0 N ' buf = ' ' * (columns - len(s)) - assert io.getvalue() == s + buf + "\r" + assert out.getvalue() == s + buf + "\r" - io = StringIO() + out = StringIO() stats.update(10**3, 0, unique=False) - stats.show_progress(item={b'path': 'foo'}, final=False, stream=io) + stats.show_progress(item={b'path': 'foo'}, final=False, stream=out) s = '1.01 kB O 10 B C 10 B D 0 N foo' buf = ' ' * (columns - len(s)) - assert io.getvalue() == s + buf + "\r" - io = StringIO() - stats.show_progress(item={b'path': 'foo'*40}, final=False, stream=io) + assert out.getvalue() == s + buf + "\r" + out = StringIO() + stats.show_progress(item={b'path': 'foo'*40}, final=False, stream=out) s = '1.01 kB O 10 B C 10 B D 0 N foofoofoofoofoofoofoofo...oofoofoofoofoofoofoofoofoo' buf = ' ' * (columns - len(s)) - assert io.getvalue() == s + buf + "\r" + assert out.getvalue() == s + buf + "\r" def test_stats_format(stats): assert str(stats) == """\