summaryrefslogtreecommitdiffstats
path: root/AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_pickletools.py
diff options
context:
space:
mode:
Diffstat (limited to 'AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_pickletools.py')
-rw-r--r--AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_pickletools.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_pickletools.py b/AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_pickletools.py
new file mode 100644
index 0000000000..6347490be4
--- /dev/null
+++ b/AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_pickletools.py
@@ -0,0 +1,24 @@
+import pickle
+import pickletools
+from test import test_support
+from test.pickletester import AbstractPickleTests
+from test.pickletester import AbstractPickleModuleTests
+
+class OptimizedPickleTests(AbstractPickleTests, AbstractPickleModuleTests):
+
+ def dumps(self, arg, proto=0, fast=0):
+ return pickletools.optimize(pickle.dumps(arg, proto))
+
+ def loads(self, buf):
+ return pickle.loads(buf)
+
+ module = pickle
+ error = KeyError
+
+def test_main():
+ test_support.run_unittest(OptimizedPickleTests)
+ test_support.run_doctest(pickletools)
+
+
+if __name__ == "__main__":
+ test_main()