Barry Warsaw pushed to branch master at mailman / Mailman

Commits:
1b46e6b6 by Barry Warsaw at 2016-04-29T23:01:30+00:00
Skip a test if readline isn't available.

Closes #230

- - - - -


1 changed file:

- src/mailman/commands/tests/test_shell.py


Changes:

=====================================
src/mailman/commands/tests/test_shell.py
=====================================
--- a/src/mailman/commands/tests/test_shell.py
+++ b/src/mailman/commands/tests/test_shell.py
@@ -27,6 +27,12 @@ from mailman.testing.helpers import configuration
 from mailman.testing.layers import ConfigLayer
 from unittest.mock import patch
 
+try:
+    import readline                                 # noqa
+    has_readline = True
+except ImportError:
+    has_readline = False
+
 
 class FakeArgs:
     interactive = None
@@ -64,6 +70,7 @@ class TestShell(unittest.TestCase):
         positional, keywords = mock.call_args
         self.assertEqual(keywords['banner'], 'my banner\n')
 
+    @unittest.skipUnless(has_readline, 'readline module is not available')
     @configuration('shell', history_file='$var_dir/history.py')
     def test_history_file(self):
         args = FakeArgs()



View it on GitLab: 
https://gitlab.com/mailman/mailman/commit/1b46e6b6262109d4befbb5a1c534ffde25d702fb
_______________________________________________
Mailman-checkins mailing list
Mailman-checkins@python.org
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to