summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2013-12-14 15:04:19 -0500
committerOleg Pudeyev <oleg@bsdpower.com>2013-12-14 15:29:29 -0500
commitb75eb5cc676a531f835002f131568acf58f616d3 (patch)
tree2281f19662e6d5dc736e54f6bc039a039b0fd6ee
parent6ddee8fb8253076ad5d73f42d59947b370bdd299 (diff)
downloadpycurl-b75eb5cc676a531f835002f131568acf58f616d3.tar.gz
Tests for close() working on all pycurl objects
-rw-r--r--tests/easy_test.py11
-rw-r--r--tests/multi_test.py4
-rw-r--r--tests/share_test.py4
3 files changed, 19 insertions, 0 deletions
diff --git a/tests/easy_test.py b/tests/easy_test.py
new file mode 100644
index 0000000..b723222
--- /dev/null
+++ b/tests/easy_test.py
@@ -0,0 +1,11 @@
+#! /usr/bin/env python
+# -*- coding: iso-8859-1 -*-
+# vi:ts=4:et
+
+import pycurl
+import unittest
+
+class EasyTest(unittest.TestCase):
+ def test_easy_close(self):
+ c = pycurl.Curl()
+ c.close()
diff --git a/tests/multi_test.py b/tests/multi_test.py
index 97bba18..f1e3c7e 100644
--- a/tests/multi_test.py
+++ b/tests/multi_test.py
@@ -358,3 +358,7 @@ class MultiTest(unittest.TestCase):
self.assertEqual('success', c1.body.getvalue())
self.assertEqual('success', c2.body.getvalue())
self.assertEqual('success', c3.body.getvalue())
+
+ def test_multi_close(self):
+ m = pycurl.CurlMulti()
+ m.close()
diff --git a/tests/share_test.py b/tests/share_test.py
index a7cc7f0..692d91e 100644
--- a/tests/share_test.py
+++ b/tests/share_test.py
@@ -48,3 +48,7 @@ class ShareTest(unittest.TestCase):
self.assertEqual('success', t1.sio.getvalue())
self.assertEqual('success', t2.sio.getvalue())
+
+ def test_share_close(self):
+ s = pycurl.CurlShare()
+ s.close()