Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Unified Diff: third_party/pexpect/tests/test_pickling.py

Issue 1398903002: Add third_party/pexpect (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@end-to-end-test
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/pexpect/tests/test_performance.py ('k') | third_party/pexpect/tests/test_popen_spawn.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/pexpect/tests/test_pickling.py
diff --git a/third_party/pexpect/tests/test_pickling.py b/third_party/pexpect/tests/test_pickling.py
new file mode 100644
index 0000000000000000000000000000000000000000..6538677075ac1a655d33e454ad4f83c0fddbef08
--- /dev/null
+++ b/third_party/pexpect/tests/test_pickling.py
@@ -0,0 +1,14 @@
+#!/usr/bin/env python
+import pickle
+import unittest
+
+from pexpect import ExceptionPexpect
+
+class PickleTest(unittest.TestCase):
+ def test_picking(self):
+ e = ExceptionPexpect('Oh noes!')
+ clone = pickle.loads(pickle.dumps(e))
+ self.assertEqual(e.value, clone.value)
+
+if __name__ == '__main__':
+ unittest.main()
« no previous file with comments | « third_party/pexpect/tests/test_performance.py ('k') | third_party/pexpect/tests/test_popen_spawn.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698