summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2014-01-13 18:55:00 -0500
committerOleg Pudeyev <oleg@bsdpower.com>2014-01-14 20:41:16 -0500
commit7facfb850aa43196146797ee7850fbe0750f92f3 (patch)
tree8a241cc5eaed477b03f94c5e074d49b4c178b267
parent3581c970db79920d044c5e74f326e50a5eaad567 (diff)
downloadpycurl-7facfb850aa43196146797ee7850fbe0750f92f3.tar.gz
Move multi option constants tests into their own file
-rw-r--r--tests/multi_option_constants_test.py23
-rw-r--r--tests/multi_test.py14
2 files changed, 23 insertions, 14 deletions
diff --git a/tests/multi_option_constants_test.py b/tests/multi_option_constants_test.py
new file mode 100644
index 0000000..1d43e41
--- /dev/null
+++ b/tests/multi_option_constants_test.py
@@ -0,0 +1,23 @@
+#! /usr/bin/env python
+# -*- coding: utf-8 -*-
+# vi:ts=4:et
+
+import pycurl
+import unittest
+
+from . import util
+
+class MultiOptionConstantsTest(unittest.TestCase):
+ @util.min_libcurl(7, 30, 0)
+ def test_multi_pipeline_opts(self):
+ assert hasattr(pycurl, 'M_MAX_HOST_CONNECTIONS')
+ assert hasattr(pycurl, 'M_MAX_PIPELINE_LENGTH')
+ assert hasattr(pycurl, 'M_CONTENT_LENGTH_PENALTY_SIZE')
+ assert hasattr(pycurl, 'M_CHUNK_LENGTH_PENALTY_SIZE')
+ assert hasattr(pycurl, 'M_MAX_TOTAL_CONNECTIONS')
+ m = pycurl.CurlMulti()
+ m.setopt(pycurl.M_MAX_HOST_CONNECTIONS, 2)
+ m.setopt(pycurl.M_MAX_PIPELINE_LENGTH, 2)
+ m.setopt(pycurl.M_CONTENT_LENGTH_PENALTY_SIZE, 2)
+ m.setopt(pycurl.M_CHUNK_LENGTH_PENALTY_SIZE, 2)
+ m.setopt(pycurl.M_MAX_TOTAL_CONNECTIONS, 2)
diff --git a/tests/multi_test.py b/tests/multi_test.py
index c90ca89..1afa674 100644
--- a/tests/multi_test.py
+++ b/tests/multi_test.py
@@ -24,20 +24,6 @@ def teardown_module(mod):
teardown_module_1(mod)
class MultiTest(unittest.TestCase):
- @util.min_libcurl(7, 30, 0)
- def test_multi_pipeline_opts(self):
- assert hasattr(pycurl, 'M_MAX_HOST_CONNECTIONS')
- assert hasattr(pycurl, 'M_MAX_PIPELINE_LENGTH')
- assert hasattr(pycurl, 'M_CONTENT_LENGTH_PENALTY_SIZE')
- assert hasattr(pycurl, 'M_CHUNK_LENGTH_PENALTY_SIZE')
- assert hasattr(pycurl, 'M_MAX_TOTAL_CONNECTIONS')
- m = pycurl.CurlMulti()
- m.setopt(pycurl.M_MAX_HOST_CONNECTIONS, 2)
- m.setopt(pycurl.M_MAX_PIPELINE_LENGTH, 2)
- m.setopt(pycurl.M_CONTENT_LENGTH_PENALTY_SIZE, 2)
- m.setopt(pycurl.M_CHUNK_LENGTH_PENALTY_SIZE, 2)
- m.setopt(pycurl.M_MAX_TOTAL_CONNECTIONS, 2)
-
def test_multi(self):
io1 = util.BytesIO()
io2 = util.BytesIO()