]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
Adds tox and coverage.py
authorArthur Gautier <baloo@gandi.net>
Wed, 30 Mar 2016 20:52:21 +0000 (20:52 +0000)
committerArthur Gautier <baloo@gandi.net>
Thu, 21 Apr 2016 15:30:55 +0000 (15:30 +0000)
Signed-off-by: Arthur Gautier <baloo@gandi.net>
25 files changed:
.coverage.ini [new file with mode: 0644]
.gitignore
.travis.yml
tests/test_bugs.py
tests/test_dnssec.py
tests/test_exceptions.py
tests/test_flags.py
tests/test_generate.py
tests/test_grange.py
tests/test_message.py
tests/test_name.py
tests/test_namedict.py
tests/test_ntoaaton.py
tests/test_rdata.py
tests/test_rdtypeandclass.py
tests/test_rdtypeanydnskey.py
tests/test_rdtypeanyeui.py
tests/test_rdtypeanyloc.py
tests/test_resolver.py
tests/test_rrset.py
tests/test_set.py
tests/test_update.py
tests/test_zone.py
tests/utest.py
tox.ini [new file with mode: 0644]

diff --git a/.coverage.ini b/.coverage.ini
new file mode 100644 (file)
index 0000000..1414ca6
--- /dev/null
@@ -0,0 +1,3 @@
+[run]
+branch = True
+source = dns
index ae6319f8d37bc3cd1343f5b6a5d653936fb4f28c..bb7767cac438394bbf7024bbfd459a653c8c2b38 100644 (file)
@@ -6,3 +6,7 @@ html.zip
 html.tar.gz
 tests/*.out
 *.pyc
+.coverage
+.tox
+dnspython.egg-info/
+.eggs/
index 1baa893823da4526746894bcffa3385d81625ffa..977af17c95741e381aed33ba2d39ded061bbf24a 100644 (file)
@@ -1,4 +1,17 @@
 language: python
 python:
+  - "2.6"
   - "2.7"
-script: make test
+  # 3.2 make unicode literal handling difficult. 
+  # we dropped that, see https://github.com/rthalley/dnspython/pull/148
+  # for comments
+  #- "3.2"
+  - "3.3"
+  - "3.4"
+  - "3.5"
+  - "3.5-dev" # 3.5 development branch
+  - "nightly" # currently points to 3.6-dev
+install:
+ - pip install unittest2
+script:
+ - make test
index bb482e760cd627cde931e71c5a6c85f03bdbc171..5d9d58b51594e28bd562603d3e3c6760fc492590 100644 (file)
 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
 # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
-import cStringIO
-import unittest
+from six import BytesIO
+try:
+    import unittest2 as unittest
+except ImportError:
+    import unittest
 
 import dns.rdata
 import dns.rdataclass
index cbbd3e22efff5e3a8be8874571668cb48691ea06..64e6638ecff8c0490aae25e052d09e4412d0b432 100644 (file)
 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
 # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
-import unittest
+try:
+    import unittest2 as unittest
+except ImportError:
+    import unittest
 
 import dns.dnssec
 import dns.name
index 90a6af4d659b4f7f5abb0d471b128eaa9864fcbc..8d04cc2584a068a43de1e61f4be78684f90d437d 100644 (file)
 # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
 import binascii
-import unittest
+try:
+    import unittest2 as unittest
+except ImportError:
+    import unittest
 
 from dns.exception import DNSException
 
index b3cf6716bcd83d67eee41ea9cc0de62129ca5d12..881ac5c20e788129a49ad7da95ff0bdd4d4b9ede 100644 (file)
 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
 # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
-import unittest
+try:
+    import unittest2 as unittest
+except ImportError:
+    import unittest
 
 import dns.flags
 import dns.rcode
index 43c5f9a47e9a546c7a73bccf7c2581e82d740441..d3bb2ee930328e56d57dac2fd0bf1c3996c9d5ee 100644 (file)
@@ -19,7 +19,10 @@ sys.path.insert(0, '../')  # Force the local project to be *the* dns
 import cStringIO
 import filecmp
 import os
-import unittest
+try:
+    import unittest2 as unittest
+except ImportError:
+    import unittest
 
 import dns.exception
 import dns.rdata
index 1bb7dbb217393f5f676d568a4eaab418f681264c..4ffe26dbe337a03aa54cb115cad718d46b50ca44 100644 (file)
@@ -19,7 +19,10 @@ sys.path.insert(0, '../')
 import cStringIO
 import filecmp
 import os
-import unittest
+try:
+    import unittest2 as unittest
+except ImportError:
+    import unittest
 
 import dns
 import dns.exception
index 931bb1977d5cc858db10fbc1f367b0768cf06ce6..8dcdf0ede84bfa0106b64b67f5965bde311cd7f2 100644 (file)
 
 import cStringIO
 import os
-import unittest
+try:
+    import unittest2 as unittest
+except ImportError:
+    import unittest
 
 import dns.exception
 import dns.message
index 894a1a438a5fdd3951ae65d6a6b4e5704bf988ba..2c00063231316df10b12c8e001dd39dc9e0fedc5 100644 (file)
 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
 # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
-import unittest
+try:
+    import unittest2 as unittest
+except ImportError:
+    import unittest
 
 import cStringIO
 import socket
index e256bfe679da3c3ffb606c3e53f7f13b6e1d47b8..d17d11d9aeba688beec94c7060be9e25e3b85606 100644 (file)
 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
 # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
-import unittest
+try:
+    import unittest2 as unittest
+except ImportError:
+    import unittest
 
 import dns.name
 import dns.namedict
index 5e33a92d8e0f534623401d5287d3579242e32397..bad0917febbf30511dc80751058c00230271810e 100644 (file)
 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
 # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
-import unittest
+try:
+    import unittest2 as unittest
+except ImportError:
+    import unittest
 
 import dns.exception
 import dns.ipv4
index 69e64e1618a54f95b707f0de40088bd9f83531f7..fbf11b3914fb0a42974ef94c077151eedb937824 100644 (file)
 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
 # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
-import unittest
+try:
+    import unittest2 as unittest
+except ImportError:
+    import unittest
 
 import dns.rdata
 import dns.rdataclass
index f3c0628d361abaa11382442d8bc451910bebed73..efdac077bb4ed50cac50e96a7851097151f2b1da 100644 (file)
 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
 # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
-import unittest
+try:
+    import unittest2 as unittest
+except ImportError:
+    import unittest
 
 import dns.rdataclass
 import dns.rdatatype
index d9e40d7f20196a2d92f4714134527b08a0e2a56d..c99cfe5041d23e61974848b7402a5c150eb3fb42 100644 (file)
 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
 # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
-import unittest
+try:
+    import unittest2 as unittest
+except ImportError:
+    import unittest
 
 import dns.rrset
 import dns.rdtypes.ANY.DNSKEY
index 800d1035d861886c9bef3e686c44503f49e090ef..e7ad862338dc9cbe3d45fb032227dfbe0c27b24d 100644 (file)
 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
 # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
-import unittest
+try:
+    import unittest2 as unittest
+except ImportError:
+    import unittest
 try:
     from StringIO import StringIO
 except ImportError:
index 8d9838c26c45b2aa890d2efeaf3851b503166e53..5cd8c70ae864a5c9d07d2c565c2d1997fd739a76 100644 (file)
 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
 # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
-import unittest
+try:
+    import unittest2 as unittest
+except ImportError:
+    import unittest
 
 import dns.rrset
 import dns.rdtypes.ANY.LOC
index 6be955b7428a178f21420ffd7dc4cbd31b73e1ae..90e0f15a1d222877b5ceef1f83f842a2b88db8b6 100644 (file)
@@ -17,7 +17,10 @@ import cStringIO
 import select
 import sys
 import time
-import unittest
+try:
+    import unittest2 as unittest
+except ImportError:
+    import unittest
 
 import dns.name
 import dns.message
index be1324b0ecfef7b3cc809e3b04489d5c2f3f5090..af6d8df9af90a0a26efe2326fb41f6ee65b4cd49 100644 (file)
 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
 # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
-import unittest
+try:
+    import unittest2 as unittest
+except ImportError:
+    import unittest
 
 import dns.rrset
 
index 583d20cfa053ad7b40435162ba0abd6f57e073fc..ef42697a7945deeb1a43886064f6ba34c431cdf9 100644 (file)
 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
 # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
-import unittest
+try:
+    import unittest2 as unittest
+except ImportError:
+    import unittest
 
 import dns.set
 
index 92ddb565fc1aece1f44a43679cfd2b529258ed50..3e888ba07567908f031d63b75825daa93f82cefb 100644 (file)
 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
 # OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
-import unittest
+try:
+    import unittest2 as unittest
+except ImportError:
+    import unittest
 
 import dns.update
 import dns.rdata
index 3b7c85502e1cd75bcbb96b54b7e7e03c4b670f84..e4dd76b49988001e7046be4efff9360f515b6306 100644 (file)
 import cStringIO
 import filecmp
 import os
-import unittest
+try:
+    import unittest2 as unittest
+except ImportError:
+    import unittest
 
 import dns.exception
 import dns.rdata
index 3a217a160cd80d539ddf34ac9403b5e158337161..d02fe4137da45de2964377063c8b6e994e5aa54a 100644 (file)
@@ -1,6 +1,9 @@
 import os.path
 import sys
-import unittest
+try:
+    import unittest2 as unittest
+except ImportError:
+    import unittest
 
 if __name__ == '__main__':
     sys.path.insert(0, os.path.realpath('..'))
diff --git a/tox.ini b/tox.ini
new file mode 100644 (file)
index 0000000..3d195d7
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,46 @@
+[tox]
+envlist =
+    py26,
+    py27,
+    py30,
+    py31,
+    py32,
+    py33,
+    py34,
+#    py35,
+    flake8,
+#    pylint,
+    coverage
+
+[testenv]
+
+commands=
+    python setup.py test
+
+deps=
+
+[testenv:py26]
+deps =
+    unittest2
+
+
+[testenv:flake8]
+commands =
+    pip install flake8
+    flake8 dns
+
+[testenv:coverage]
+basepython = python2
+
+deps =
+    coverage
+
+commands =
+    python setup.py install
+    coverage run --rcfile=.coverage.ini setup.py test
+    coverage report
+
+[pep8]
+show-pep8 = True
+show-source = True
+