summaryrefslogtreecommitdiff
path: root/test/test_shellutils.py
diff options
context:
space:
mode:
authorLaurent Peuch <cortex@worlddomination.be>2020-03-19 12:24:34 +0100
committerLaurent Peuch <cortex@worlddomination.be>2020-03-19 12:24:34 +0100
commit0509e03d3f295862ca15986c004ae6c48917b15f (patch)
treef7b45e84ba72e3347faa6c456cf1014f34f63e8e /test/test_shellutils.py
parenta4237c8c1a66364ef5ff522b62c3089b3a6b5724 (diff)
downloadlogilab-common-0509e03d3f295862ca15986c004ae6c48917b15f.tar.gz
Please the flake8 god
Diffstat (limited to 'test/test_shellutils.py')
-rw-r--r--test/test_shellutils.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/test/test_shellutils.py b/test/test_shellutils.py
index 8cb06ca..1d8b326 100644
--- a/test/test_shellutils.py
+++ b/test/test_shellutils.py
@@ -17,9 +17,7 @@
# with logilab-common. If not, see <http://www.gnu.org/licenses/>.
"""unit tests for logilab.common.shellutils"""
-import sys, os, tempfile, shutil
from os.path import join, dirname, abspath
-import datetime, time
from unittest.mock import patch
from logilab.common.testlib import TestCase, unittest_main
@@ -197,7 +195,6 @@ class ProgressBarTC(TestCase):
expected_stream = StringIO()
size = 20
pgb = ProgressBar(100, size, stream=pgb_stream)
- last = 0
for dots in range(10, 105, 15):
pgb.update(dots, exact=True)
dots //= 5
@@ -209,7 +206,6 @@ class ProgressBarTC(TestCase):
expected_stream = StringIO()
size = 20
pgb = ProgressBar(100, size, stream=pgb_stream)
- last = 0
for dots in range(5, 105, 5):
pgb.update(5, exact=False)
dots //= 5
@@ -259,13 +255,13 @@ class RawInputTC(TestCase):
def test_ask_prompt(self):
self.input_answer = ""
- answer = self.qa.ask("text", ("yes", "no"), "yes")
+ self.qa.ask("text", ("yes", "no"), "yes")
self.assertEqual(self.input_args[0], "text [Y(es)/n(o)]: ")
- answer = self.qa.ask("text", ("y", "n"), "y")
+ self.qa.ask("text", ("y", "n"), "y")
self.assertEqual(self.input_args[0], "text [Y/n]: ")
- answer = self.qa.ask("text", ("n", "y"), "y")
+ self.qa.ask("text", ("n", "y"), "y")
self.assertEqual(self.input_args[0], "text [n/Y]: ")
- answer = self.qa.ask("text", ("yes", "no", "maybe", "1"), "yes")
+ self.qa.ask("text", ("yes", "no", "maybe", "1"), "yes")
self.assertEqual(self.input_args[0], "text [Y(es)/n(o)/m(aybe)/1]: ")
def test_ask_ambiguous(self):