Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | 1299 - stop using [] in any vector | Kartik K. Agaram | 2015-05-07 | 1 | -7/+7 |
| | | | | | | | | | Useful check: $ grep "[^ '\"]\[[^\"]" *.cc \ |perl -pwe 's/\Wargv\[|\WTests\[|\Wframe\[|\WMemory\[|\WName\[|\WSurrounding_space\[|\WRecipe\[|\WType\[|\WRecipe_number\[|\WType_number\[|\WBefore_fragments\[|\WAfter_fragments\[//g' \ |perl -pwe 's/\Wargv\[|\WTests\[|\Wframe\[|\WMemory\[|\WName\[|\WSurrounding_space\[|\WRecipe\[|\WType\[|\WRecipe_number\[|\WType_number\[|\WBefore_fragments\[|\WAfter_fragments\[//g' \ |grep '[^ ]\[' | ||||
* | 1278 - support before/after tangle directives | Kartik K. Agaram | 2015-05-05 | 1 | -30/+19 |
|
|
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #333333 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #666666 } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008800 } /* Keyword.Pseudo */
.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #8if __name__ == '__main__': from __init__ import init; init()
import unittest
import curses
from ranger.gui import ui
from test import Fake, OK, raise_ok
ui.curses = Fake()
class Test(unittest.TestCase):
def setUp(self):
self.fm = Fake()
self.ui = ui.UI(env=Fake(), fm=self.fm)
def fakesetup():
self.ui.widget = Fake()
self.ui.add_child(self.ui.widget)
self.ui.setup = fakesetup
self.ui.initialize()
def tearDown(self):
self.ui.destroy()
def test_passing(self):
# Test whether certain method calls are passed to widgets
widget = self.ui.widget
widget.draw = raise_ok
self.assertRaises(OK, self.ui.draw)
widget.__clear__()
widget.finalize = raise_ok
self.assertRaises(OK, self.ui.finalize)
widget.__clear__()
widget.press = raise_ok
random_key = 123
self.assertRaises(OK, self.ui.handle_key, random_key)
widget.__clear__()
widget.destroy = raise_ok
self.assertRaises(OK, self.ui.destroy)
widget.__clear__()
if __name__ == '__main__':
unittest.main()
|