Skip to content

Commit eca378a

Browse files
committed
remove some urwid-specific mentions and keys
1 parent 2d3d2eb commit eca378a

File tree

4 files changed

+1
-55
lines changed

4 files changed

+1
-55
lines changed

README.rst

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,9 @@ Dependencies
88
* Sphinx != 1.1.2 (for the documentation only) (apt-get install python-sphinx)
99
* mock (for the testsuite only)
1010
* babel (optional, for internationalization)
11-
12-
bpython-curtsies
13-
----------------
14-
``bpython-curtsies`` requires the following additional packages:
15-
16-
* curtsies >= 0.1.0
11+
* curtsies
1712
* greenlet
1813

19-
bpython-urwid
20-
-------------
21-
``bpython-urwid`` requires the following additional packages:
22-
23-
* urwid
24-
2514
Introduction
2615
============
2716
A few people asked for stuff like syntax highlighting and autocomplete for the

bpython/keys.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,12 @@ def __setitem__(self, key, value):
4747
self.map[key] = value
4848

4949
cli_key_dispatch = KeyMap(tuple())
50-
urwid_key_dispatch = KeyMap('')
5150

5251
# fill dispatch with letters
5352
for c in string.ascii_lowercase:
5453
cli_key_dispatch['C-%s' % c] = (chr(string.ascii_lowercase.index(c) + 1),
5554
'^%s' % c.upper())
5655

57-
for c in string.ascii_lowercase:
58-
urwid_key_dispatch['C-%s' % c] = 'ctrl %s' % c
59-
urwid_key_dispatch['M-%s' % c] = 'meta %s' % c
60-
6156
# fill dispatch with cool characters
6257
cli_key_dispatch['C-['] = (chr(27), '^[')
6358
cli_key_dispatch['C-\\'] = (chr(28), '^\\')
@@ -68,6 +63,3 @@ def __setitem__(self, key, value):
6863
# fill dispatch with function keys
6964
for x in xrange(1, 13):
7065
cli_key_dispatch['F%s' % str(x)] = ('KEY_F(%s)' % str(x),)
71-
72-
for x in xrange(1, 13):
73-
urwid_key_dispatch['F%s' % str(x)] = 'f%s' % str(x)

bpython/test/test_crashers.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,5 @@ def check_no_traceback(self, data):
104104
class CursesCrashersTest(TrialTestCase, CrashersTest):
105105
backend = "cli"
106106

107-
class UrwidCrashersTest(TrialTestCase, CrashersTest):
108-
backend = "urwid"
109-
110107
if __name__ == "__main__":
111108
unittest.main()

bpython/test/test_keys.py

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -32,37 +32,5 @@ def raiser():
3232
keys.cli_key_dispatch['C-qwerty']
3333
self.assertRaises(KeyError, raiser);
3434

35-
class TestUrwidKeys(unittest.TestCase):
36-
def test_keymap_map(self):
37-
"""Verify KeyMap.map being a dictionary with the correct
38-
length."""
39-
self.assertEqual(len(keys.urwid_key_dispatch.map), 64)
40-
41-
def test_keymap_setitem(self):
42-
"""Verify keys.KeyMap correctly setting items."""
43-
keys.urwid_key_dispatch['simon'] = 'awesome';
44-
self.assertEqual(keys.urwid_key_dispatch['simon'], 'awesome')
45-
46-
def test_keymap_delitem(self):
47-
"""Verify keys.KeyMap correctly removing items."""
48-
keys.urwid_key_dispatch['simon'] = 'awesome'
49-
del keys.urwid_key_dispatch['simon']
50-
if 'simon' in keys.urwid_key_dispatch.map:
51-
raise Exception('Key still exists in dictionary')
52-
53-
def test_keymap_getitem(self):
54-
"""Verify keys.KeyMap correctly looking up items."""
55-
self.assertEqual(keys.urwid_key_dispatch['F11'], 'f11')
56-
self.assertEqual(keys.urwid_key_dispatch['C-a'], 'ctrl a')
57-
self.assertEqual(keys.urwid_key_dispatch['M-a'], 'meta a')
58-
59-
def test_keymap_keyerror(self):
60-
"""Verify keys.KeyMap raising KeyError when getting undefined key"""
61-
def raiser():
62-
keys.urwid_key_dispatch['C-asdf']
63-
keys.urwid_key_dispatch['C-qwerty']
64-
self.assertRaises(KeyError, raiser);
65-
66-
6735
if __name__ == '__main__':
6836
unittest.main()

0 commit comments

Comments
 (0)