diff options
Diffstat (limited to 'test/test_shellutils.py')
-rw-r--r-- | test/test_shellutils.py | 12 |
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): |