]> git.pld-linux.org Git - packages/python-cssutils.git/commitdiff
- enchanced tests patch
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 30 Aug 2020 07:40:46 +0000 (09:40 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Sun, 30 Aug 2020 07:40:46 +0000 (09:40 +0200)
python-cssutils-tests.patch

index 33ceaacb005be47de8fe9ceaee4851ce0d0617fb..c10d06534d100bfa307b05730611b9642ff2cc9c 100644 (file)
@@ -1,11 +1,36 @@
---- cssutils-1.0.2/src/cssutils/tests/test_errorhandler.py.orig        2017-07-03 19:31:47.420236687 +0200
-+++ cssutils-1.0.2/src/cssutils/tests/test_errorhandler.py     2017-07-03 19:31:51.623569973 +0200
-@@ -84,7 +84,7 @@
+--- cssutils-1.0.2/src/cssutils/tests/test_errorhandler.py.orig        2020-08-30 09:20:19.626140366 +0200
++++ cssutils-1.0.2/src/cssutils/tests/test_errorhandler.py     2020-08-30 09:37:59.517065111 +0200
+@@ -74,6 +74,13 @@
\r
+     def test_linecol(self):\r
+         "cssutils.log line col"\r
++        def has_libxml2():\r
++            try:\r
++                import libxml2\r
++                return True\r
++            except:\r
++                return False\r
++\r
+         o = cssutils.log.raiseExceptions\r
+         cssutils.log.raiseExceptions = True\r
+         \r
+@@ -84,7 +91,7 @@
              self.assertEqual(str(e), 'CSSImportRule: Unexpected ident. [1:9: x]')\r
              self.assertEqual(e.line, 1)\r
              self.assertEqual(e.col, 9)\r
 -            if sys.platform.startswith('java'):\r
-+            if sys.platform.startswith('java') or sys.version_info[0] < 3:\r
++            if sys.platform.startswith('java') or not has_libxml2():\r
                  self.assertEqual(e.msg, u'CSSImportRule: Unexpected ident. [1:9: x]')\r
              else:\r
                  self.assertEqual(e.args, (u'CSSImportRule: Unexpected ident. [1:9: x]',))\r
+--- cssutils-1.0.2/src/cssutils/tests/test_encutils/__init__.py.orig   2015-11-25 23:11:26.000000000 +0100
++++ cssutils-1.0.2/src/cssutils/tests/test_encutils/__init__.py        2020-08-30 09:28:21.096865349 +0200
+@@ -203,7 +203,7 @@
+                 #('utf-8', u'\u1111'.encode('utf-8'))\r
+                 ]\r
+         for exp, test in tests:\r
+-            self.assertEqual(exp, encutils.tryEncodings(test))\r
++            self.assertEqual(exp, encutils.tryEncodings(test).lower())\r
\r
\r
+     def test_getEncodingInfo(self):\r
This page took 0.431348 seconds and 4 git commands to generate.