[Python-modules-commits] r29609 - in packages/python-libdiscid/trunk/debian (8 files)
sramacher at users.alioth.debian.org
sramacher at users.alioth.debian.org
Thu Jul 3 18:47:27 UTC 2014
Date: Thursday, July 3, 2014 @ 18:47:26
Author: sramacher
Revision: 29609
* Privide DEP-8 tests:
- debian/tests: Add DEP-8 tests for both the Python 2 and Python 3 packages.
- debian/patches/tests-relative-imports.patch: Use relative imports to
make the test suite work with DEP-8 tests.
* debian/control: Change libdisci0-dev to libdiscid-dev in Build-Depends.
Added:
packages/python-libdiscid/trunk/debian/patches/tests-relative-imports.patch
packages/python-libdiscid/trunk/debian/tests/
packages/python-libdiscid/trunk/debian/tests/control
packages/python-libdiscid/trunk/debian/tests/python2-all
packages/python-libdiscid/trunk/debian/tests/python3-all
Modified:
packages/python-libdiscid/trunk/debian/changelog
packages/python-libdiscid/trunk/debian/control
packages/python-libdiscid/trunk/debian/patches/series
Modified: packages/python-libdiscid/trunk/debian/changelog
===================================================================
--- packages/python-libdiscid/trunk/debian/changelog 2014-07-03 17:27:30 UTC (rev 29608)
+++ packages/python-libdiscid/trunk/debian/changelog 2014-07-03 18:47:26 UTC (rev 29609)
@@ -1,3 +1,13 @@
+python-libdiscid (0.4.1-2) unstable; urgency=medium
+
+ * Privide DEP-8 tests:
+ - debian/tests: Add DEP-8 tests for both the Python 2 and Python 3 packages.
+ - debian/patches/tests-relative-imports.patch: Use relative imports to
+ make the test suite work with DEP-8 tests.
+ * debian/control: Change libdisci0-dev to libdiscid-dev in Build-Depends.
+
+ -- Sebastian Ramacher <sramacher at debian.org> Thu, 03 Jul 2014 20:38:30 +0200
+
python-libdiscid (0.4.1-1) unstable; urgency=low
* New upstream version.
Modified: packages/python-libdiscid/trunk/debian/control
===================================================================
--- packages/python-libdiscid/trunk/debian/control 2014-07-03 17:27:30 UTC (rev 29608)
+++ packages/python-libdiscid/trunk/debian/control 2014-07-03 18:47:26 UTC (rev 29609)
@@ -5,7 +5,7 @@
Uploaders: Sebastian Ramacher <sramacher at debian.org>
Build-Depends:
debhelper (>= 9),
- libdiscid0-dev (>= 0.6),
+ libdiscid-dev (>= 0.6),
python-all-dev (>= 2.6.3-3~),
python-all-dev (>= 2.7.5) | python-unittest2,
python-all-dbg,
@@ -22,6 +22,7 @@
python-doc
X-Python-Version: >= 2.6
X-Python3-Version: >= 3.2
+XS-Testsuite: autopkgtest
Standards-Version: 3.9.5
Vcs-Svn: svn://anonscm.debian.org/python-modules/packages/python-libdiscid/trunk/
Vcs-Browser: http://anonscm.debian.org/viewvc/python-modules/packages/python-libdiscid/trunk/
Modified: packages/python-libdiscid/trunk/debian/patches/series
===================================================================
--- packages/python-libdiscid/trunk/debian/patches/series 2014-07-03 17:27:30 UTC (rev 29608)
+++ packages/python-libdiscid/trunk/debian/patches/series 2014-07-03 18:47:26 UTC (rev 29609)
@@ -1 +1,2 @@
sphinx-documentation.patch
+tests-relative-imports.patch
Added: packages/python-libdiscid/trunk/debian/patches/tests-relative-imports.patch
===================================================================
--- packages/python-libdiscid/trunk/debian/patches/tests-relative-imports.patch (rev 0)
+++ packages/python-libdiscid/trunk/debian/patches/tests-relative-imports.patch 2014-07-03 18:47:26 UTC (rev 29609)
@@ -0,0 +1,114 @@
+Description: Use relative imports to make test suite work with DEP-8 tests
+Author: Sebastian Ramacher <sramacher at debian.org>
+Last-Update: 204-07-03
+
+--- python-libdiscid-0.4.1.orig/libdiscid/tests/test_compat_discid.py
++++ python-libdiscid-0.4.1/libdiscid/tests/test_compat_discid.py
+@@ -30,6 +30,7 @@ except ImportError:
+ import libdiscid
+ from libdiscid.compat import discid
+ from libdiscid.compat.discid import DiscError, TOCError
++from .common import PutSuccess, PutFail1, PutFail2, PutFail3, PutFail2_2, PutFail3_2
+
+ # as long as Python 3.2 is supported, hack around the missing u
+ try:
+@@ -81,7 +82,7 @@ class TestCompatDiscID(unittest.TestCase
+ self.assertRaises(DiscError, discid.read, b'/does/not/exist')
+
+ def test_put(self):
+- testdata = libdiscid.tests.common.PutSuccess
++ testdata = PutSuccess
+
+ disc = discid.put(testdata.first, testdata.last, testdata.sectors,
+ testdata.offsets)
+@@ -111,29 +112,29 @@ class TestCompatDiscID(unittest.TestCase
+
+ def test_put_fail_1(self):
+ # !(first < last)
+- testdata = libdiscid.tests.common.PutFail1
++ testdata = PutFail1
+ self.assertRaises(TOCError, discid.put, testdata.first, testdata.last,
+ testdata.sectors, testdata.offsets)
+
+ def test_put_fail_2(self):
+ # !(first >= 1)
+- testdata = libdiscid.tests.common.PutFail2
++ testdata = PutFail2
+ self.assertRaises(TOCError, discid.put, testdata.first, testdata.last,
+ testdata.sectors, testdata.offsets)
+
+ # !(first < 100)
+- testdata = libdiscid.tests.common.PutFail2_2
++ testdata = PutFail2_2
+ self.assertRaises(TOCError, discid.put, testdata.first, testdata.last,
+ testdata.sectors, testdata.offsets)
+
+ def test_put_fail_3(self):
+ # !(last >= 1)
+- testdata = libdiscid.tests.common.PutFail3
++ testdata = PutFail3
+ self.assertRaises(TOCError, discid.put, testdata.first, testdata.last,
+ testdata.sectors, testdata.offsets)
+
+ # !(last < 100)
+- testdata = libdiscid.tests.common.PutFail3_2
++ testdata = PutFail3_2
+ self.assertRaises(TOCError, discid.put, testdata.first, testdata.last,
+ testdata.sectors, testdata.offsets)
+
+--- python-libdiscid-0.4.1.orig/libdiscid/tests/test_libdiscid.py
++++ python-libdiscid-0.4.1/libdiscid/tests/test_libdiscid.py
+@@ -28,8 +28,8 @@ try:
+ except ImportError:
+ import unittest
+ import libdiscid
+-import libdiscid.tests.common
+ from libdiscid import DiscError
++from .common import PutSuccess, PutFail1, PutFail2, PutFail3, PutFail2_2, PutFail3_2
+
+ # as long as Python 3.2 is supported, hack around the missing u
+ try:
+@@ -72,7 +72,7 @@ class TestLibDiscId(unittest.TestCase):
+ self.assertRaises(NotImplementedError, libdiscid.read)
+
+ def test_put(self):
+- testdata = libdiscid.tests.common.PutSuccess
++ testdata = PutSuccess
+
+ disc = libdiscid.put(testdata.first, testdata.last, testdata.sectors,
+ testdata.offsets)
+@@ -106,29 +106,29 @@ class TestLibDiscId(unittest.TestCase):
+
+ def test_put_fail_1(self):
+ # !(first < last)
+- testdata = libdiscid.tests.common.PutFail1
++ testdata = PutFail1
+ self.assertRaises(DiscError, libdiscid.put, testdata.first, testdata.last,
+ testdata.sectors, testdata.offsets)
+
+ def test_put_fail_2(self):
+ # !(first >= 1)
+- testdata = libdiscid.tests.common.PutFail2
++ testdata = PutFail2
+ self.assertRaises(DiscError, libdiscid.put, testdata.first, testdata.last,
+ testdata.sectors, testdata.offsets)
+
+ # !(first < 100)
+- testdata = libdiscid.tests.common.PutFail2_2
++ testdata = PutFail2_2
+ self.assertRaises(DiscError, libdiscid.put, testdata.first, testdata.last,
+ testdata.sectors, testdata.offsets)
+
+ def test_put_fail_3(self):
+ # !(last >= 1)
+- testdata = libdiscid.tests.common.PutFail3
++ testdata = PutFail3
+ self.assertRaises(DiscError, libdiscid.put, testdata.first, testdata.last,
+ testdata.sectors, testdata.offsets)
+
+ # !(last < 100)
+- testdata = libdiscid.tests.common.PutFail3_2
++ testdata = PutFail3_2
+ self.assertRaises(DiscError, libdiscid.put, testdata.first, testdata.last,
+ testdata.sectors, testdata.offsets)
+
Added: packages/python-libdiscid/trunk/debian/tests/control
===================================================================
--- packages/python-libdiscid/trunk/debian/tests/control (rev 0)
+++ packages/python-libdiscid/trunk/debian/tests/control 2014-07-03 18:47:26 UTC (rev 29609)
@@ -0,0 +1,5 @@
+Tests: python2-all
+Depends: python-all, python-libdiscid, python-pytest
+
+Tests: python3-all
+Depends: python3-all, python3-libdiscid, python3-pytest
Added: packages/python-libdiscid/trunk/debian/tests/python2-all
===================================================================
--- packages/python-libdiscid/trunk/debian/tests/python2-all (rev 0)
+++ packages/python-libdiscid/trunk/debian/tests/python2-all 2014-07-03 18:47:26 UTC (rev 29609)
@@ -0,0 +1,10 @@
+#!/bin/sh
+set -e
+
+cp -r libdiscid/tests $ADTTMP
+cd $ADTTMP/tests
+
+PYVERS=$(pyversions -vi)
+for py in $PYVERS ; do
+ python$py -m pytest .
+done
Property changes on: packages/python-libdiscid/trunk/debian/tests/python2-all
___________________________________________________________________
Added: svn:executable
+ *
Added: packages/python-libdiscid/trunk/debian/tests/python3-all
===================================================================
--- packages/python-libdiscid/trunk/debian/tests/python3-all (rev 0)
+++ packages/python-libdiscid/trunk/debian/tests/python3-all 2014-07-03 18:47:26 UTC (rev 29609)
@@ -0,0 +1,10 @@
+#!/bin/sh
+set -e
+
+cp -r libdiscid/tests $ADTTMP
+cd $ADTTMP/tests
+
+PYVERS=$(py3versions -vi)
+for py in $PYVERS ; do
+ python$py -m pytest .
+done
Property changes on: packages/python-libdiscid/trunk/debian/tests/python3-all
___________________________________________________________________
Added: svn:executable
+ *
More information about the Python-modules-commits
mailing list