diff -ru blessed-1.14.1_orig/blessed/tests/test_core.py blessed-1.14.1/blessed/tests/test_core.py
--- blessed-1.14.1_orig/blessed/tests/test_core.py 2015-12-21 16:49:59.000000000 -0500
+++ blessed-1.14.1/blessed/tests/test_core.py 2017-10-04 19:32:51.799172266 -0400
@@ -259,12 +259,13 @@
import blessed.keyboard
if hasattr(collections, 'OrderedDict'):
- monkeypatch.delattr('collections.OrderedDict')
+ monkeypatch.delattr(collections, 'OrderedDict')
try:
imp.reload(blessed.keyboard)
except ImportError as err:
assert err.args[0] in ("No module named ordereddict", # py2
+ "cannot import name OrderedDict", #p26
"No module named 'ordereddict'") # py3
sys.modules['ordereddict'] = mock.Mock()
sys.modules['ordereddict'].OrderedDict = -1
@@ -281,7 +282,7 @@
"Test python version 3.0 through 3.2 raises an exception."
import blessed
- monkeypatch.setattr('platform.python_version_tuple',
+ monkeypatch.setattr(platform, 'python_version_tuple',
lambda: ('3', '2', '2'))
try:
diff -ru blessed-1.14.1_orig/blessed/tests/test_keyboard.py blessed-1.14.1/blessed/tests/test_keyboard.py
--- blessed-1.14.1_orig/blessed/tests/test_keyboard.py 2015-12-21 16:49:59.000000000 -0500
+++ blessed-1.14.1/blessed/tests/test_keyboard.py 2017-10-04 17:06:47.748083899 -0400
@@ -35,7 +35,7 @@
unichr = chr
-@pytest.mark.skipif(os.environ.get('TEST_QUICK', None) is not None,
+@pytest.mark.skipif("os.environ.get('TEST_QUICK', None) is not None",
reason="TEST_QUICK specified")
def test_kbhit_interrupted():
"kbhit() should not be interrupted with a signal handler."
@@ -77,7 +77,7 @@
assert math.floor(time.time() - stime) == 1.0
-@pytest.mark.skipif(os.environ.get('TEST_QUICK', None) is not None,
+@pytest.mark.skipif("os.environ.get('TEST_QUICK', None) is not None",
reason="TEST_QUICK specified")
def test_kbhit_interrupted_nonetype():
"kbhit() should also allow interruption with timeout of None."
@@ -210,7 +210,7 @@
child()
-@pytest.mark.skipif(os.environ.get('TEST_QUICK', None) is not None,
+@pytest.mark.skipif("os.environ.get('TEST_QUICK', None) is not None",
reason="TEST_QUICK specified")
def test_keystroke_1s_cbreak_noinput():
"1-second keystroke without input; '' should be returned after ~1 second."
@@ -225,7 +225,7 @@
child()
-@pytest.mark.skipif(os.environ.get('TEST_QUICK', None) is not None,
+@pytest.mark.skipif("os.environ.get('TEST_QUICK', None) is not None",
reason="TEST_QUICK specified")
def test_keystroke_1s_cbreak_noinput_nokb():
"1-second keystroke without input or keyboard."
@@ -338,7 +338,7 @@
assert math.floor(time.time() - stime) == 0.0
-@pytest.mark.skipif(os.environ.get('TRAVIS', None) is not None,
+@pytest.mark.skipif("os.environ.get('TRAVIS', None) is not None",
reason="travis-ci does not handle ^C very well.")
def test_keystroke_0s_raw_input_ctrl_c():
"0-second keystroke with raw allows receiving ^C."
@@ -397,7 +397,7 @@
assert math.floor(time.time() - stime) == 0.0
-@pytest.mark.skipif(os.environ.get('TEST_QUICK', None) is not None,
+@pytest.mark.skipif("os.environ.get('TEST_QUICK', None) is not None",
reason="TEST_QUICK specified")
def test_keystroke_1s_cbreak_with_input():
"1-second keystroke w/multibyte sequence; should return after ~1 second."
@@ -428,7 +428,7 @@
assert math.floor(time.time() - stime) == 1.0
-@pytest.mark.skipif(os.environ.get('TEST_QUICK', None) is not None,
+@pytest.mark.skipif("os.environ.get('TEST_QUICK', None) is not None",
reason="TEST_QUICK specified")
def test_esc_delay_cbreak_035():
"esc_delay will cause a single ESC (\\x1b) to delay for 0.35."
@@ -462,7 +462,7 @@
assert 34 <= int(duration_ms) <= 45, duration_ms
-@pytest.mark.skipif(os.environ.get('TEST_QUICK', None) is not None,
+@pytest.mark.skipif("os.environ.get('TEST_QUICK', None) is not None",
reason="TEST_QUICK specified")
def test_esc_delay_cbreak_135():
"esc_delay=1.35 will cause a single ESC (\\x1b) to delay for 1.35."