diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2011-10-26 13:50:50 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2011-10-26 13:50:50 (GMT) |
| commit | e46ef289e142982d7bd592faa7b0f85470364c01 (patch) | |
| tree | cda253e03788f7db0a7cdcd05662f66b4455e298 /src/python/stdlib/test/test_readline.py | |
| parent | d0d0d62bbcbb5c3417f8cba419c83bac192ea985 (diff) | |
| download | powder-e46ef289e142982d7bd592faa7b0f85470364c01.zip powder-e46ef289e142982d7bd592faa7b0f85470364c01.tar.gz | |
Remove Python console stuff
Diffstat (limited to 'src/python/stdlib/test/test_readline.py')
| -rw-r--r-- | src/python/stdlib/test/test_readline.py | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/src/python/stdlib/test/test_readline.py b/src/python/stdlib/test/test_readline.py deleted file mode 100644 index 11045c8..0000000 --- a/src/python/stdlib/test/test_readline.py +++ /dev/null @@ -1,43 +0,0 @@ -""" -Very minimal unittests for parts of the readline module. - -These tests were added to check that the libedit emulation on OSX and -the "real" readline have the same interface for history manipulation. That's -why the tests cover only a small subset of the interface. -""" -import unittest -from test.test_support import run_unittest, import_module - -# Skip tests if there is no readline module -readline = import_module('readline') - -class TestHistoryManipulation (unittest.TestCase): - def testHistoryUpdates(self): - readline.clear_history() - - readline.add_history("first line") - readline.add_history("second line") - - self.assertEqual(readline.get_history_item(0), None) - self.assertEqual(readline.get_history_item(1), "first line") - self.assertEqual(readline.get_history_item(2), "second line") - - readline.replace_history_item(0, "replaced line") - self.assertEqual(readline.get_history_item(0), None) - self.assertEqual(readline.get_history_item(1), "replaced line") - self.assertEqual(readline.get_history_item(2), "second line") - - self.assertEqual(readline.get_current_history_length(), 2) - - readline.remove_history_item(0) - self.assertEqual(readline.get_history_item(0), None) - self.assertEqual(readline.get_history_item(1), "second line") - - self.assertEqual(readline.get_current_history_length(), 1) - - -def test_main(): - run_unittest(TestHistoryManipulation) - -if __name__ == "__main__": - test_main() |
