[Python-modules-commits] r25800 - in packages/python-libdiscid/trunk/debian (3 files)
sramacher at users.alioth.debian.org
sramacher at users.alioth.debian.org
Mon Sep 9 15:35:52 UTC 2013
Date: Monday, September 9, 2013 @ 15:35:40
Author: sramacher
Revision: 25800
Fix brace-expansion-in-debhelper-config-file and skip read tests if its not
available
Added:
packages/python-libdiscid/trunk/debian/patches/skip-read-tests-if-not-available.patch
Modified:
packages/python-libdiscid/trunk/debian/patches/series
packages/python-libdiscid/trunk/debian/python3-libdiscid.install
Modified: packages/python-libdiscid/trunk/debian/patches/series
===================================================================
--- packages/python-libdiscid/trunk/debian/patches/series 2013-09-09 15:00:48 UTC (rev 25799)
+++ packages/python-libdiscid/trunk/debian/patches/series 2013-09-09 15:35:40 UTC (rev 25800)
@@ -1 +1,2 @@
sphinx-documentation.patch
+skip-read-tests-if-not-available.patch
Added: packages/python-libdiscid/trunk/debian/patches/skip-read-tests-if-not-available.patch
===================================================================
--- packages/python-libdiscid/trunk/debian/patches/skip-read-tests-if-not-available.patch (rev 0)
+++ packages/python-libdiscid/trunk/debian/patches/skip-read-tests-if-not-available.patch 2013-09-09 15:35:40 UTC (rev 25800)
@@ -0,0 +1,89 @@
+Description: Skip read tests if read is not supported
+Origin: upstream,
+ https://github.com/sebastinas/python-libdiscid/commit/11a0cee9
+Last-Update: 2013-09-09
+
+diff --git a/libdiscid/tests/test_compat_discid.py b/libdiscid/tests/test_compat_discid.py
+index 60e85bd..f668ac7 100644
+--- a/libdiscid/tests/test_compat_discid.py
++++ b/libdiscid/tests/test_compat_discid.py
+@@ -24,13 +24,14 @@
+ """
+
+ try:
+- from unittest2 import TestCase, main
++ import unittest2 as unittest
+ except ImportError:
+- from unittest import TestCase, main
++ import unittest
++import libdiscid
+ from libdiscid.compat import discid
+ from libdiscid.compat.discid import DiscError, TOCError
+
+-class TestCompatDiscID(TestCase):
++class TestCompatDiscID(unittest.TestCase):
+ def test_default_device(self):
+ self.assertIsNotNone(discid.get_default_device())
+
+@@ -51,12 +52,18 @@ def test_empty_is_none(self):
+ self.assertIsNone(disc.seconds)
+ self.assertEqual(len(disc.tracks), 0)
+
++ @unittest.skipIf(libdiscid.FEATURES_MAPPING[libdiscid.FEATURE_READ] not in
++ libdiscid.FEATURES, "not available on this platform")
+ def test_read_fail(self):
+ self.assertRaises(DiscError, discid.read, u'/does/not/exist')
+
++ @unittest.skipIf(libdiscid.FEATURES_MAPPING[libdiscid.FEATURE_READ] not in
++ libdiscid.FEATURES, "not available on this platform")
+ def test_encoded_device(self):
+ self.assertRaises(DiscError, discid.read, '/does/not/exist')
+
++ @unittest.skipIf(libdiscid.FEATURES_MAPPING[libdiscid.FEATURE_READ] not in
++ libdiscid.FEATURES, "not available on this platform")
+ def test_byte_device(self):
+ self.assertRaises(DiscError, discid.read, b'/does/not/exist')
+
+@@ -131,4 +138,4 @@ def test_put_fail_3(self):
+
+
+ if __name__ == '__main__':
+- main()
++ unittest.main()
+diff --git a/libdiscid/tests/test_libdiscid.py b/libdiscid/tests/test_libdiscid.py
+index b0cf9d3..e138f62 100644
+--- a/libdiscid/tests/test_libdiscid.py
++++ b/libdiscid/tests/test_libdiscid.py
+@@ -24,13 +24,13 @@
+ """
+
+ try:
+- from unittest2 import TestCase, main
++ import unittest2 as unittest
+ except ImportError:
+- from unittest import TestCase, main
++ import unittest
+ import libdiscid
+ from libdiscid import DiscError
+
+-class TestLibDiscId(TestCase):
++class TestLibDiscId(unittest.TestCase):
+ def test_version(self):
+ self.assertIsNotNone(libdiscid.__version__)
+ self.assertIsNotNone(libdiscid.__discid_version__)
+@@ -48,6 +48,8 @@ def test_features(self):
+ self.assertIsNotNone(libdiscid.FEATURE_ISRC)
+ self.assertIsNotNone(libdiscid.FEATURES_MAPPING)
+
++ @unittest.skipIf(libdiscid.FEATURES_MAPPING[libdiscid.FEATURE_READ] not in
++ libdiscid.FEATURES, "not available on this platform")
+ def test_read_fail(self):
+ self.assertRaises(DiscError, libdiscid.read, u'/does/not/exist')
+
+@@ -123,4 +125,4 @@ def test_put_fail_3(self):
+
+
+ if __name__ == '__main__':
+- main()
++ unittest.main()
+
Modified: packages/python-libdiscid/trunk/debian/python3-libdiscid.install
===================================================================
--- packages/python-libdiscid/trunk/debian/python3-libdiscid.install 2013-09-09 15:00:48 UTC (rev 25799)
+++ packages/python-libdiscid/trunk/debian/python3-libdiscid.install 2013-09-09 15:35:40 UTC (rev 25800)
@@ -1,4 +1,4 @@
usr/lib/python3/*-packages/*.egg-info
usr/lib/python3/*-packages/libdiscid/*.py
usr/lib/python3/*-packages/libdiscid/compat/*.py
-usr/lib/python3/*-packages/libdiscid/*[!d]m{,u}.so
+usr/lib/python3/*-packages/libdiscid/_discid.*[!d]m*.so
More information about the Python-modules-commits
mailing list